Filed under:

PHP Error messages




If you are trying to debug a PHP application but do not see any error messages or just get a blank page, you may want to enable PHP errors to be displayed to the screen, you can do this by adding these lines to the begging of your PHP code...


ini_set("error_reporting", 7);
ini_set("display_errors", "On");


If you are using linux you can do this for all php files by creating/editing a .htaccess file with the following...

php_flag display_errors on
php_value error_reporting 7


Please remember to remove these lines when you have finished debugging your code.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
article icon What is phpMyAdmin? (Views: 2032)
article icon What is PHP? (Views: 2504)

Language: