I wrote an extension for PHP to produce a custom HTML error message when
PHP encounters a fatal error. It's now live on Wikimedia. Previously,
fatal errors were generally displayed to the user as blank pages.
The HTML is based on the squid error message. It can be updated by editing
this file:
<http://svn.wikimedia.org/viewvc/mediawiki/trunk/php/wmerrors/error.html>
and then copying it to /home/wikipedia/common/php-fatal-error.html and
syncing it. There is no need to restart Apache.
The extension at present is only a slight improvement over PHP's
error_prepend_string/error_append_string, but there's plenty of room for
improvement.
-- Tim Starling
Show replies by date