Last modified: 2013-09-04 11:49:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33822, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31822 - 500 error in db upgrade stage due to output buffer reset in stdout
500 error in db upgrade stage due to output buffer reset in stdout
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.17.x
PC Linux
: High blocker (vote)
: 1.18.0 release
Assigned To: Chad H.
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-19 15:01 UTC by Woozle
Modified: 2013-09-04 11:49 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Woozle 2011-10-19 15:01:34 UTC
Symptom: upon reaching the "Upgrade existing installation" stage -- my exact URL is http://woozalia.com/mw-config/index.php?page=Upgrade -- the installer hangs with a 500 error.

After detailed investigation, I found that the problem occurs after the 10th iteration of DatabaseUpdater::runUpdates(). The problem seems to be that the next call to $this->output() (which is actually Maintenance::output()) in ConvertLinks::execute() writes text to the BEGINNING of the output buffer instead of to the END. This mungs the HTTP headers in a way which apparently makes Apache very unhappy.

(I determined this by sending different text, which somehow changed the situation so that instead of a 500 error, I received the page as a file download -- which allowed me to see the source text that was being sent, which contained my text at the beginning -- before the HTTP headers.)

This is probably a kluge, but I was able to stop the error from happening by changing the line "$f = fopen( 'php://stdout', 'w' );" to "$f = fopen( 'php://output', 'a' );".

Now it gets all the way to "Populating log_search table" before hanging (at least there's no 500 error).
Comment 1 Chad H. 2011-11-02 18:09:09 UTC
Fixed in r101644, thanks!
Comment 2 Antoine "hashar" Musso (WMF) 2011-11-10 15:13:40 UTC
Reopening. This cause bug 32325 on PHP 5.2.6 and earlier because of PHP Bug 45303
https://bugs.php.net/bug.php?id=45303
Comment 3 Chad H. 2011-11-15 15:05:45 UTC
Cleaned up in r103179, reclosing.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links