r69360 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69359‎ | r69360 | r69361 >
Date:23:07, 14 July 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Fix flush(). Need ob_flush()
Modified paths:
  • /trunk/phase3/includes/installer/WebInstallerOutput.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstallerOutput.php
@@ -66,6 +66,7 @@
6767 }
6868 if ( !$this->redirectTarget && strlen( $this->contents ) ) {
6969 echo $this->contents;
 70+ ob_flush();
7071 flush();
7172 $this->contents = '';
7273 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r75794Revert r69360 (adding ob_flush() to WebInstallerOutput::flush()). Per CR, thi...demon15:12, 1 November 2010

Comments

#Comment by Ævar Arnfjörð Bjarmason (talk | contribs)   18:35, 24 July 2010

This commit broke PHP 5.2.*. With it there's no output after the ob_flush(). But without it the installer works normally.

I tried upgrading to 5.3.2-1ubuntu4 which made the problem go away, but 5.2.10-2ubuntu6 remains broken.

I tried twiddling around how flushing was done (see the ob_flush docs), e.g. calling ob_end_flush() before, or ob_start() after. None of the stuff I tried worked.

I'm running apache with output_buffering = Off. Setting that to 4096 also makes the problem go away on 5.2. Maybe we should just check whether output_buffering is turned on before calling ob_flush? But then again nothing else in MediaWiki calls it, so I thought I'd ask why it's needed in the first place.

#Comment by 😂 (talk | contribs)   15:15, 18 October 2010

Without the ob_flush(), I wasn't getting output flushed to the browser on each call (I was on 5.3.2 as well, I believe). I don't remember what my output_buffering was set to at the time. But ob_flush() made it work, I swear :)

Other combinations of ob_end_flush/ob_start/etc didn't seem to work, like you said.

Maybe just revert for now?

Status & tagging log