I have an issue on one of the web servers where display_errors is set to off in the php.ini file in /etc/php5/apache2/php.ini:
; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but ; it could be very dangerous in production environments. Depending on the code ; which is triggering the error, sensitive information could potentially leak ; out of your application such as database usernames and passwords or worse. ; It's recommended that errors be logged on production servers rather than ; having the errors sent to STDOUT. ; Possible Values: ; Off = Do not display any errors ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) ; On or stdout = Display errors to STDOUT ; Default Value: On ; Development Value: On ; Production Value: Off ; http://php.net/display-errors display_errors = Off
Higher up in the file the value is commented out.
However errors and warnings are still are still shown on the webpages.
phpinfo(); shows that display_errors is set to on but I can't understand where it is getting this value from. I'm guessing it must be overridden from somewhere.
Also if I change other options in php.ini then these are reflected in phpinfo but it just seems to ignore the display_errors one for some reason.
Any help would be appreciated.