From 708a3ed3a14a5a42382ed7390234a58398afd1f8 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 25 Apr 2005 08:35:55 +0000 Subject: [PATCH] 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? --- docs/NEWS | 5 +++++ include/functions.inc.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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"); } } -- 2.39.5