PHP errors NOT being displayed in the browser [Ubuntu 10.10] PHP errors NOT being displayed in the browser [Ubuntu 10.10] apache apache

PHP errors NOT being displayed in the browser [Ubuntu 10.10]


Don't just enable the first occurrence of display_errors in the php.ini file. Make sure you scroll down to the "real" setting and change it from Off to On.

The thing is that if you settle with changing (i.e. uncomment + add = On) by the very first occurrence of display_errors your changes will be overwritten somewhere on line 480 where it's set to Off again.


I had the same problem - solved it by setting display_errors = On in both php.ini files.

/etc/php5/apache2/php.ini/etc/php5/cli/php.ini

Then restarting Apache:

sudo /etc/init.d/apache2 restart

Hope this helps.


To make it work you should change the following variables in your php.ini:

; display_errors; Default Value: On; Development Value: On; Production Value: Off; display_startup_errors; Default Value: On; Development Value: On; Production Value: Off; error_reporting; Default Value: E_ALL & ~E_NOTICE; Development Value: E_ALL | E_STRICT ; Production Value: E_ALL & ~E_DEPRECATED; html_errors ; Default Value: On ; Development Value: On ; Production value: Off; log_errors; Default Value: On ; Development Value: On ; Production Value: On

Search for them as they are already defined and put your desired value.Then restart your apache2 server and everything will work fine. Good luck!