There are several places / configurations to control error reporting and handling in PHP.

The php.ini file

Note: where your php.ini file is located or which of the php.ini files is the used one by your apache you can find out by the PHP function phpinfo(). Include echo phpinfo() at the beginning of you php application.

Some important directives (for all look [ here]):

display_errors boolean

error_reporting integer

log_errors boolean

error_log string


To display errors to the screen (embedded in the HTML code) set display_errors = on. To log errors (addidtionally) in the apache log file set log_errors = on and don't set (uncomment) error_log.

The function error_reporting(...) in your PHP application (runtime option)

Set the error reporting level at runtime (overrides the corresponding value of the php.ini). If the script has fatal errors it won't have any affect. This is because the desired runtime action does not get executed.

The function set_error_handler

Sets a user function (error_handler) to handle errors in a script. CompletionSearch uses an own error handler which is defined in error_handler.php.

CompleteSearch: completesearch/PHPErrorReporting (last edited 2007-10-29 15:35:47 by guest-58)