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

Php-wmerrors: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Krinkle
No edit summary
 
imported>Krinkle
mNo edit summary
 
Line 30: Line 30:
==External links==
==External links==
*[[git:mediawiki/php/wmerrors|Source code]]
*[[git:mediawiki/php/wmerrors|Source code]]
*[[phab:tag/wmerrors/|Issue tracker]]
 
{{Lowercase title}}
{{Lowercase title}}
[[Category:MediaWiki production]]
[[Category:MediaWiki production]]

Latest revision as of 18:04, 7 June 2022

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