Posts Tagged ‘Messages’

Hiding Error Messages from Users

Friday, March 7th, 2008

Set the following values in your php.ini or web server configuration file:
display_errors =off
log_errors =on
These settings tell PHP not to display errors as HTML to the browser but to put
them in the server’s error log.
When log_errors is set to on,error messages are written to the server’s error log. If
you want PHP errors to be written to a separate file,set the error_log configuration
directive with the name of that file:
error_log = /var/log/php.error.log

(more…)