From: [EMAIL PROTECTED] Operating system: Windows 2000 Server PHP version: 4.3.0 PHP Bug Type: *Compression related Bug description: output handler 'ob_gzhandler' cannot be used twice
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 bug report at http://bugs.php.net/?id=21228&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21228&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21228&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21228&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21228&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21228&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21228&r=support Expected behavior: http://bugs.php.net/fix.php?id=21228&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21228&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21228&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21228&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21228&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21228&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21228&r=isapi