How to detect automatically if zlib.output_compression is set?

Wikka has a problem when zlib.output_compression is set. This is a simple technique to make wikka compatible and requires no action from administrator when the server environment changes :
$zlib_OC_is_set = eregi('On|(^[0-9]+$)', ini_get('zlib_output_compression'));


Then add a condition
(&& (!$zlib_OC_is_set))
when testing if $_SERVER['HTTP_ACCEPT_ENCODING'] allows gzip content encoding.

Question:
The PHP manual suggests the using of ZLib library is preferable to using ob_gzhandler. Now, I have no idea why one is preferable to the other (speed?, but then how widespread is zlib module in PHP installs for e.g.?), so I ask if anyone knows why. If a user has zlib installed, then another alternative is to use .htaccess:

<FilesMatch "\.(php|html?)$">
php_value zlib.output_compression 4096
</FilesMatch>


Also - what is the bug you are fixing here - any is it specific to Wikka, or a general bug? Is is browser dependant? I've used zlib.output_compression with wakka for ages without a problem. Thanks for any info! --IanAndolina


Category
WikkaDevelopment
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki