Use ob_implicit_flush() rather than ob_end_flush() in install-utils.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Aug 2004 05:45:25 +0000 (05:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Aug 2004 05:45:25 +0000 (05:45 +0000)
Ending the buffering completely will kill all subsequent output when
PHP is globally configured to run through a gzip compression handler.

Also, suppress the warning in LocalSettings.php when PHP tells us we
can't run the gzip filter twice.

config/index.php
install-utils.inc

index 85890fa..991e0e3 100644 (file)
@@ -827,7 +827,7 @@ if ( \$wgCommandLineMode ) {
        }
 } elseif ( empty( \$wgConfiguring ) ) {
        ## Compress output if the browser supports it
-       {$zlib}if( !ini_get( 'zlib.output_compression' ) ) ob_start( 'ob_gzhandler' );
+       {$zlib}if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
 }
 
 \$wgSitename         = \"{$slconf['Sitename']}\";
index 34dd701..1fb2cc8 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
 function install_version_checks() {
-       # Turn off output buffering if it's on
-       @ob_end_flush();
+       # We dare not turn output buffer _off_ since this will break completely
+       # if PHP is globally configured to run through a gzip filter.
+       @ob_implicit_flush( true );
        
        if( !function_exists( "version_compare" ) ) {
                # version_compare was introduced in 4.1.0