You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

php-wmerrors

From Wikitech-static
Revision as of 18:41, 6 June 2022 by imported>Krinkle
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 useland 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

External links