PHP not displaying errors even though display_errors = On
I had the same issue and finally solved it. My mistake was that I tried to change /etc/php5/cli/php.ini, but then I found another php.ini here: /etc/php5/apache2/php.ini, changed display_errors = On, restarted the web-server and it worked!
May be it would be helpful for someone absent-minded like me.
You also need to make sure you have your php.ini
file include the following set or errors will go only to the log that is set by default or specified in the virtual host's configuration.
display_errors = On
The php.ini
file is where base settings for all PHP on your server, however these can easily be overridden and altered any place in the PHP code and effect everything following that change. A good check is to add the display_errors
directive to your php.ini
file. If you don't see an error, but one is being logged, insert this at the top of the file causing the error:
ini_set('display_errors', 1);
error_reporting(E_ALL);
If this works then something earlier in your code is disabling error display.