From: oriol dot gual at gmail dot com Operating system: Windows XP SP2 PHP version: 5.1.4 PHP Bug Type: Session related Bug description: Sessions not working when zlib.output_compression is set to on
Description: ------------ When zlib.output_compression is set to On, PHP always starts a new session. I've looked at the headers, and PHP is always sending the cookie for the session id. The same happens using trans sid on, or manually appending the session id to the link. If zlib.output_compression is turned Off it's working ok. Also, if I use ob_start("ob_gzhandler"); first and then ob_end_flush(); at the end, everything works as expected. Reproduce code: --------------- <?php session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } echo $_SESSION['count']; echo " <a href=\"test.php">Refresh</a>"; ?> Expected result: ---------------- 0, 1, 2, 3 , 4... Actual result: -------------- 0, 0, 0, 0, 0... -- Edit bug report at http://bugs.php.net/?id=37962&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37962&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37962&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37962&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37962&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37962&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37962&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37962&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37962&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37962&r=support Expected behavior: http://bugs.php.net/fix.php?id=37962&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37962&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37962&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37962&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37962&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37962&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37962&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37962&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37962&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37962&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37962&r=mysqlcfg