Home » Php » PHP – Syntax errors no longer showing (blank white page)

PHP – Syntax errors no longer showing (blank white page)

Posted by: admin July 12, 2020 Leave a comment

Questions:

Server got upgraded from PHP 5.2 to 5.3 and now I am no longer getting syntax errors, just a blank white page. I know this is a common question, and I normally know what needs to be done, I’ve just never had this situation before.

php.ini has display_errors on and error_reporting is set to E_ALL & E_NOTICE. Are there any other directives that could be affecting it? I used to get syntax error messages ("Unexpected ; in file on line...").

Am I being really stupid here?

How to&Answers:

I had the directive slightly wrong. The correct value in php.ini needs to be:

E_ALL & ~E_NOTICE

Answer:

try in php.ini

error_reporting = E_ALL | E_STRICT
display_errors = On

save and restart apache

Answer:

you didnt mention the OS but assuming you work on an Unix variant, you can see the errors by running this command :

tail -f /var/logs/apache2/error.log 

or maybe

tail -f /var/log/httpd/error_log

And the web server configurations might have been changed too.