Page MenuHomePhabricator

" ErrorException from line 136 of /usr/home/saper/public_html/b/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent" when running Special:RunJobs
Closed, ResolvedPublic

Description

Pretty default MediaWiki installation running git 1.27alpha (dd5a887).

Debug log tells us we try to set cookie when sending internal request to the job queue:

`
[runJobs] refreshLinks Template:Documentation pages=array(1) rootJobSignature=d11df2eab71de9ae9409a4b2c5aeff5079cf9b99 rootJobTimestamp=20151013185830 masterPos= (id=19,timestamp=20151013190051) t=179 good
MediaWiki::doPreOutputCommit completed; all transactions committed
[cookie] setcookie: "blenderwikiUseDC", "master", "1444772280", "/", "", "", "1"
[error] [a92b0b3e] /~saper/b/index.php?title=Special%3ARunJobs&tasks=jobs&maxjobs=1&sigexpiry=1444772274&signature=53ee4a7d4a19ebc8f791062ab1f5986ae6a4f381   ErrorException from line 136 of /usr/home/saper/public_html/b/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 [internal function]: setcookie(string, string, integer, string, string, boolean, boolean)
#2 /usr/home/saper/public_html/b/includes/WebResponse.php(136): call_user_func(string, string, string, integer, string, string, boolean, boolean)
#3 /usr/home/saper/public_html/b/includes/MediaWiki.php(512): WebResponse->setCookie(string, string, integer)
#4 /usr/home/saper/public_html/b/includes/MediaWiki.php(674): MediaWiki->doPreOutputCommit()
#5 /usr/home/saper/public_html/b/includes/MediaWiki.php(475): MediaWiki->main()
#6 /usr/home/saper/public_html/b/index.php(41): MediaWiki->run()
#7 {main}
Request ended normally
[caches] main: Memcached
`

Introduced by 0a1c04beae41a7fe6f57152dfd7c0bc9261528e0

Details

Related Gerrit Patches:

Event Timeline

saper created this task.Oct 13 2015, 9:48 PM
saper raised the priority of this task from to Needs Triage.
saper updated the task description. (Show Details)
saper added a project: MediaWiki-JobQueue.
saper added a subscriber: saper.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 13 2015, 9:48 PM
saper assigned this task to aaron.Oct 13 2015, 9:48 PM
saper set Security to None.

Change 250593 had a related patch set uploaded (by Aaron Schulz):
Avoid "headers already sent" error in jobs for UseDC cookie

https://gerrit.wikimedia.org/r/250593

Change 250593 merged by jenkins-bot:
Avoid "headers already sent" error in jobs for UseDC cookie

https://gerrit.wikimedia.org/r/250593

saper closed this task as Resolved.Nov 3 2015, 11:20 AM

Thanks, this fixes it!