From:             usenet0 at malkusch dot de
Operating system: Linux
PHP version:      4.3.2
PHP Bug Type:     Output Control
Bug description:  ob_gzhandler fails with with sessions and trans_sid

Description:
------------
Hi

When using the ob_gzhandler (and no output_buffering is set in .htaccess)
and using Sessions it won't compress the output.

And this happens only when PHP needs to rewrite the output because of
trans_sid.

In PHP 4.3.0 additionally the Error "Warning: (null)() [ref.outcontrol]:
output handler 'ob_gzhandler' cannot be used twice in Unknown on line 0"
occured.

Bye Markus Malkusch

Reproduce code:
---------------
<?php
session_start();
if (!isset($_SESSION['i'])) {
        $_SESSION['i'] = 1;
} else {
        $_SESSION['i']++;
}
ob_start('ob_gzhandler');
echo 'i = '.$_SESSION['i'];
?><a href="bug.html">bug.html</a>


Expected result:
----------------
A compressed output to the browser even, when URIs are rewritten.

Actual result:
--------------
No compressed output, when PHP has to rewrite the URIs.

-- 
Edit bug report at http://bugs.php.net/?id=24315&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24315&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24315&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24315&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24315&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24315&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24315&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24315&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24315&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24315&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24315&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24315&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24315&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24315&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24315&r=gnused

Reply via email to