Parse errors are not displayed Parse errors are not displayed php php

Parse errors are not displayed


Setting error level in php file itself does not resolve the problem here because the file itself cannot be parsed !!

You need to change error_reporting line in your php.ini as follows:

error_reporting = E_ALL

BTW: There are some examples in php.ini file about what to do to display which type of error messages.

Good luck,

mcemoz


Apache doesn't always like to report parsing errors either. From the command line, run

php -l <file>

The -l switch tells PHP to check file syntax. See the man page.


E_STRICT is not included in E_ALL (until PHP 6). If you want to keep getting E_STRICT

In php.ini:

error_reporting = E_ALL | E_STRICT

At runtime:

error_reporting( E_ALL | E_STRICT );

You'll need to set the error reporting level (and display_errors) in php.ini to see syntax errors. If PHP encounters a syntax error, the runtime doesn't get executed, so setting at runtime won't work. (See the display_errors link.)