From: garvinhicking Date: Mon, 25 Apr 2005 08:35:55 +0000 (+0000) Subject: Fix PHP error which comes because session_start() is called before the obgzhandler... X-Git-Tag: 0.8.1~30^2~4 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=708a3ed3a14a5a42382ed7390234a58398afd1f8;p=s9y.git Fix PHP error which comes because session_start() is called before the obgzhandler ob_start and if session.use_trans_sid is activated. Currently this is more a hotfix - it effectively disables gzcompression on servers with use_trans_sid. We would need to move serendipity_gzCompression before session_start, but I don't dare touch this beast I have no knowledge of. Tom? --- diff --git a/docs/NEWS b/docs/NEWS index 4f41986..ad07b0a 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,11 @@ Version 0.9 () ------------------------------------------------------------------------ + * Fix error "Warning: ob_start(): output handler 'ob_gzhandler' + cannot be used after 'URL-Rewriter'" which can occur on installations + where session.use_trans_sid is activated and Serendipity's gzip + compression is used. (garvinhicking) + * Adjusted checking for "convert" binary in installation for Windows servers. Thanks to BobRock! (garvinhicking) diff --git a/include/functions.inc.php b/include/functions.inc.php index 30c270e..254f041 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -24,7 +24,7 @@ function serendipity_truncateString($s, $len) { function serendipity_gzCompression() { global $serendipity; - if (isset($serendipity['useGzip']) && serendipity_db_bool($serendipity['useGzip']) && function_exists('ob_gzhandler') && extension_loaded('zlib') && serendipity_ini_bool(ini_get('zlib.output_compression')) == false) { + if (isset($serendipity['useGzip']) && serendipity_db_bool($serendipity['useGzip']) && function_exists('ob_gzhandler') && extension_loaded('zlib') && serendipity_ini_bool(ini_get('zlib.output_compression')) == false && serendipity_ini_bool(ini_get('session.use_trans_sid')) == false) { ob_start("ob_gzhandler"); } }