Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | PRODUCTION ERROR | tstarling | T157392 Warning: Cannot modify header information - headers already sent in /srv/mediawiki/php-1.29.0-wmf.10/includes/WebResponse.php on line 45 | ||
Duplicate | PRODUCTION ERROR | None | T158270 PHP warnings should be logged via Monolog (with a stack trace), not HHVM |
Event Timeline
Seems like we already have this. MWExceptionHandler already installs an error handler which logs to the "error" channel.
Yes, in theory this should be already happening but doesn't. (Or maybe doesn't some of the time, not sure.)
If it was only a routing issue, I'd expect the error to not show up anywhere. If ends up in HHVM, then it's probably not caught.
Strike that, the handler actually passes the error on:
// This handler is for logging only. Return false will instruct PHP // to continue regular handling. return false;
@bd808 do you know why we do that? Is that to make fatalmonitor work?
We do that because it's the correct way for a default set_error_handler() to function. If we swallowed the errors there without returning false then $php_errormsg would not be populated and all errors would be handled as though the @ suppression operator was applied to every line in the codebase.
See T45086#787151. The channel is too noisy to log on WMF's production servers.
This whole ticket is really a duplicate of T45086: Capture PHP warnings with stacktraces in MediaWiki and save to logstash.