Knowledgebase
Home > Knowledgebase > Error messages > Why is my PHP page coming up blank?
Why is my PHP page coming up blank?
By default PHP5 does not not display script error messages in the browser, returning either a completely or partially blank page instead. This behavior is by design and intended to avoid giving informative feedback to malicious users who could use the generated error messages to gather information useful in an attack.
Unfortunately this conspires to make tracking down problems in your scripts rather more difficult, but here are several things you can do that might be helpful.
Check the Apache error log for further details of the error. You'll find that in the server control panel using the Log Manager button. If that doesn't help and you still need to display the error in the browser, try adding this to the top of your script:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
or this code to your .htaccess file:
php_flag display_errors on
In both those cases be sure to remove the code when you have resolved your issue to avoid exposing sensitive information about your site.