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

       Web browser: ---
             Bug #: 31342
           Summary: OutputHandler is not initialized depending on PHP.ini
                    settings
           Product: MediaWiki
           Version: 1.17.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


MediaWiki    1.17.0
PHP    5.3.8-1~dotdeb.2 (cgi-fcgi)
MySQL    5.1.58-1~dotdeb.1

In /includes/Webstart.php, starting at line 132:

    # Initialise output buffering
    # Check that there is no previous output or previously set up buffers,
because
    # that would cause us to potentially mix gzip and non-gzip output, creating
a
    # big mess.
    if ( !defined( 'MW_NO_OUTPUT_BUFFER' ) && ob_get_level() == 0 ) {
        require_once( "$IP/includes/OutputHandler.php" );
        ob_start( 'wfOutputHandler' );
    }


The output handler is not initialized if ob_get_level() != 0. As a consequence,
gzip content encoding would not be enabled.

The problem is that ob_get_level() will always return 1 or more if you have
output buffering enabled in php.ini (output_buffering is false by default, but
PHP suggests a production value of 4096), which means that basically every PHP
script starts with ob_start().

One solution to this problem would be to remove the default output buffer early
when Mediawiki starts:

    while(ob_get_level() > 0){
       ob_end_clean();
    }

If this is undesired, and if the conditional check in Webstart is not changed,
at the least, mediawiki setup should show a warning notice that with the given
output_buffering setting, its output handler (i.e. gzip handler) won't be
executed.

-- 
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to