Page 1 of 1

gzip compressed pages

Posted: Tue Mar 08, 2005 9:58 pm
by manafta
I'm glad to see that gzip can be used in s9y 0.8. But if on the server zlib.output_compression is set to On, you get an error message because it conflicts with ob_gzhandler. So an extra check for the zlib.output_compression should be added.

The following code fixes this:

Code: Select all

function serendipity_gzCompression() {
    global $serendipity;
    if (isset($serendipity['useGzip']) && serendipity_db_bool($serendipity['useGzip']) && function_exists('ob_gzhandler') && extension_loaded('zlib') && ini_get('zlib.output_compression')!=1) {
        ob_start("ob_gzhandler");
    }
}

Posted: Wed Mar 09, 2005 11:21 am
by tomsommer
Thanks, I fixed this in CVS