Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docs:programming:php:error_handling [2007/03/23 22:56] – created billh | docs:programming:php:error_handling [2008/08/03 00:25] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Error Handling ====== | ====== Error Handling ====== | ||
Normally, when an error occurs in a PHP script, the error message is inserted into the script' | Normally, when an error occurs in a PHP script, the error message is inserted into the script' | ||
+ | |||
+ | |||
+ | ===== Production Server Configuration ===== | ||
+ | Make sure to modify the php.ini file as shown below. | ||
+ | * Note: Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. | ||
+ | < | ||
+ | ; Print out errors (as a part of the output). | ||
+ | ; you're strongly encouraged to turn this feature off, and use error logging | ||
+ | ; instead (see below). | ||
+ | ; may reveal security information to end users, such as file paths on your Web | ||
+ | ; server, your database schema or other information. | ||
+ | display_errors = Off | ||
+ | |||
+ | ; Even when display_errors is on, errors that occur during PHP's startup | ||
+ | ; sequence are not displayed. | ||
+ | ; display_startup_errors off, except for when debugging. | ||
+ | display_startup_errors = Off | ||
+ | </ | ||
===== Changing Error Reporting ===== | ===== Changing Error Reporting ===== |