This is an extension for enhancing and customising the handling of PHP errors.
Compile and install it in the usual way, there are no special dependencies:
The options are:
Set this to true to enable custom error handling. This allows the extension
to be disabled with ini_set() at any time before the fatal error is
Set this to the path to an HTML file which you wish to be displayed to your
users. A sample HTML file is distributed with this extension in error.html.
If this is set, display_errors should be disabled to prevent a duplicate
message from being shown.
The error HTML may contain the following special variables, which will be
replaced with the appropriate values when the error message is generated.
Unlike PHP's display_errors, these values will be properly escaped to avoid
- $file: The filename in which the error occurred
- $line: The line number at which the error occurred
- $message: The error message
Set this to the path to a PHP file which will be executed in the event of a
If the script file outputs an error message, display_errors should be disabled
to prevent a duplicate message from being shown.
The name of a file to send error reports to. This is similar to PHP's
error_log, except that it provides several additional features. Logging to
a TCP or UDP network socket is also supported, using a URL of the form:
Set this to true if you want the error report sent to wmerrors.log_file to
include a backtrace.
If an error is encountered while opening or writing to the file specified
in wmerrors.log_file, then the error will be ignored if this is set to
true. If it is set to false, the error will be handled with PHP's standard
error handling, and so will be available via display_errors or error_log.
If this is true, a concise backtrace, listing base filenames (not including
the path) and line numbers only, will be included in the error message
which is passed through to PHP, for output into error_log.