Jump to content

php-wmerrors

From Wikitech
(Redirected from PHP error pages)

php-wmerrors is a PHP extension that extends how PHP errors are handled and displayed. It is specifically designed for situations where the standard PHP API is not sufficient for userland code to render an error page and log stacktraces (e.g. out of memory errors). More technical details can be found in T187147#4298721 (last evaluated in 2018 for PHP 7.1+).

Service at WMF

Configuration

Error page:

The bulk of the logic is in the php-wmerrors extension. At runtime, we inject the php7-fatal-error.php (maintained in Puppet) which defines the HTML template, and takes care of the stats counter and normalized ingestion to Logstash, synthetising a message under type:mediawiki AND channel:exception, structured the same way as uncaught exceptions that userland code in MediaWiki is able to report directly.

Appservers:

mw-on-k8s (ref T288851)

Deployment

For the official Pecl packages, refer to How to PECL on mediawiki.org.

For production, refer to Debian Packaging.

Code stewardship