thedude
Well-known member
PHP 5.5.7 running on Apache 2.4.7
XenForo 1.2.4
php.ini
zlib.output_compression = On
zlib.output_compression_level = 1
zlib.output_handler not set
I noticed the pages being served by xenforo on my server weren't compressed, so I created a simple test script, ran it off my server and it came back correctly with gzip compression.
after digging into the code, it turns out this chunk of code is preventing my server from compressing pages:
library/XenForo/Application.php
Commenting it out gives me proper compression again
XenForo 1.2.4
php.ini
zlib.output_compression = On
zlib.output_compression_level = 1
zlib.output_handler not set
I noticed the pages being served by xenforo on my server weren't compressed, so I created a simple test script, ran it off my server and it came back correctly with gzip compression.
after digging into the code, it turns out this chunk of code is preventing my server from compressing pages:
library/XenForo/Application.php
Code:
// see http://bugs.php.net/bug.php?id=36514
// and http://xenforo.com/community/threads/53637/
if (!@ini_get('output_handler'))
{
$level = ob_get_level();
while ($level)
{
ob_end_clean();
$newLevel = ob_get_level();
if ($newLevel >= $level)
{
break;
}
$level = $newLevel;
}
}
Commenting it out gives me proper compression again