Page MenuHomePhabricator

MediaWiki 1.31 throws PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/mw-sqlite/includes/profiler/SectionProfiler.php:99) in /var/www/html/mw-sqlite/includes/WebResponse.php on line 74
Open, Needs TriagePublic

Description

I downloaded current LTS from mediawiki.org, and installed it locally, using SQLite. Version details:

The following warning is thrown when loading the mainpage.

Apache errors.log
[Sun Oct 04 19:08:27.355076 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/mw-sqlite/includes/profiler/SectionProfiler.php:99) in /var/www/html/mw-sqlite/includes/WebResponse.php on line 74, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355090 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP Stack trace:, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355100 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   1. {main}() /var/www/html/mw-sqlite/index.php:0, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355109 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   2. MediaWiki->run() /var/www/html/mw-sqlite/index.php:42, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355119 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   3. MediaWiki->main() /var/www/html/mw-sqlite/includes/MediaWiki.php:524, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355128 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   4. MediaWiki->{closure:/var/www/html/mw-sqlite/includes/MediaWiki.php:823-829}() /var/www/html/mw-sqlite/includes/MediaWiki.php:837, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355138 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   5. OutputPage->output() /var/www/html/mw-sqlite/includes/MediaWiki.php:825, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355147 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   6. OutputPage->sendCacheControl() /var/www/html/mw-sqlite/includes/OutputPage.php:2403, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355156 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   7. WebResponse->header() /var/www/html/mw-sqlite/includes/OutputPage.php:2269, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete
[Sun Oct 04 19:08:27.355166 2020] [php7:notice] [pid 21523] [client ::1:63311] PHP   8. header() /var/www/html/mw-sqlite/includes/WebResponse.php:74, referer: http://localhost/mw-sqlite/mw-config/index.php?page=Complete

Not sure if it's worth handling, but it forced me to set display_errors = Off locally :-).

Event Timeline

Urbanecm created this task.Oct 4 2020, 5:13 PM
Restricted Application added a project: Performance-Team. · View Herald TranscriptOct 4 2020, 5:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TK-999 added a subscriber: TK-999.Oct 5 2020, 12:43 AM

MediaWiki 1.31 doesn't support PHP 7.4, IIRC. This warning was fixed in rMW278227608808c25242c87a7092da5fb9adc50cde.

Gilles moved this task from Inbox to Radar on the Performance-Team board.Oct 5 2020, 6:37 PM
Gilles edited projects, added Performance-Team (Radar); removed Performance-Team.