#37962 [Opn->Fbk]: Sessions not working when zlib.output_compression is set to on
| From: | mike@php.net | Date: | Thu, 29 Jun 2006 18:04:53 +0000 |
| Subject: | #37962 [Opn->Fbk]: Sessions not working when zlib.output_compression is set to on | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98950@lists.php.net to get a copy of this message | ||
ID: 37962
Updated by: mike@php.net
Reported By: oriol dot gual at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: Windows XP SP2
PHP Version: 5.1.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-06-29 17:32:30] oriol dot gual at gmail dot com
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 this bug report at http://bugs.php.net/?id=37962&edit=1