Errors in PHP

Displaying PHP errors are good for debugging, they are good for development and QA departments, but errors may provide too much information in production environment.

In php.ini it is possible to control how much debugging information is displayed.

Setting error_reporting = E_ALL will provide all of the errors.

It is possible to write PHP errors in a file php.ini needs to have the following settings: error_log = ./errors.log where error log name is path and filename for the error log file.

Setting error_reporting = 0 will turn off errors.

It is a good idea to aggregate errors from multiple machines to a single location in a production environment, if it has more then one machine,

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator