From Wikitech

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


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.


mw-on-k8s (ref T288851)


For the official Pecl packages, refer to How to PECL on

For production, refer to Debian Packaging.

Code stewardship

External links