#21228 [Com]: output handler 'ob_gzhandler' cannot be used twice

From: Date: Sat, 28 Dec 2002 19:15:53 +0000
Subject: #21228 [Com]: output handler 'ob_gzhandler' cannot be used twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28613@lists.php.net to get a copy of this message
ID: 21228 Comment by: chris@de-punkt.de Reported By: mlaukast1@hotmail.com Status: Open Bug Type: *Compression related Operating System: Windows 2000 Server PHP Version: 4.3.0 New Comment: The error occurs on Linux, too. A customer reported it and it can nicely be reproduced with <?php ob_start("ob_gzhandler"); ?> which yields the warning visible under http://www.christopher-kunz.de/ob.php Environment is http://www.christopher-kunz.de/info.php Previous Comments: ------------------------------------------------------------------------ [2002-12-27 19:40:31] mlaukast1@hotmail.com If I use ob_start("ob_gzhandler") function I get an error message: "PHP Warning: ob_gzhandler() [<a href='http://www.php.net/ref.outcontrol'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used twice in c:\web\test.php3 on line 11". The same script runs fine on 4.2.3. Interestingly, on version 4.3.0 ob_get_level() returns 2 and on 4.2.3 the return value is 1. I'm using Windows 2000 Server/IIS5. PHP is configured in CGI mode. Here's the script: //---start--- <% ob_start("ob_gzhandler"); %> <html> <body> <h3>This is a test. ob_get_level: <% echo ob_get_level(); %></h3> </body> </html> <% if(ob_get_level()){ ob_end_flush(); } %> //---end--- And here's the essential configurations from the 'php.ini' file: output_buffering = 4096 output_handler = zlib.output_compression = Off implicit_flush = Off unserialize_callback_func= allow_call_time_pass_reference = Off If I set "output_handler = ob_gzhandler" and remove the ob_start("ob_gzhandler") from the script it's working on 4.3.0 as well. However, this way the compression is always on and I can't determine myself when to use it. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21228&edit=1

« previous php.bugs (#28613) next »