https://bugzilla.wikimedia.org/show_bug.cgi?id=26130

           Summary: Output is double-compressed if compression enabled
                    prior to script start.
           Product: MediaWiki
           Version: 1.17-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: Installation
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: w...@kennel17.co.uk
                CC: innocentkil...@gmail.com


I just did an svn switch from REL_1_16 to trunk, ran update.php and went to the
main page, only to get a whole bunch of garbled output.

To cut a long story short, I tracked this down to the fact that the output was
being compressed twice.

I have the following line in my LocalSettings.php:

----------------------
if ( $wgCommandLineMode ) {
    if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) )
{
        die( "This script must be run from the command line\n" );
    }
} elseif ( empty( $wgNoOutputBuffer ) ) {
    ## Compress output if the browser supports it
    if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
}
----------------------

This line enables output buffering if it is not already enabled.  The important
thing to note here, is that this was automatically created by the installer
script at the point I first installed MW, whenever that was.  It is therefore
very likely that a lot of users have this line in their LocalSettings.php, and
will therefore suffer this same breakage when they upgrade to 1.17 unless this
issue is fixed!

I tracked the problem down to r72349, where the logic for starting output
buffering was changed in WebStart.php.

The old logic realised that buffering was started, and did nothing.
The new logic does not correctly detect this situation, so output
buffering/compression is started, resulting in double-compression.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to