#37962 [Fbk->Opn]: Sessions not working when zlib.output_compression is set to on
| From: | oriol dot gual at gmail dot com | Date: | Tue, 04 Jul 2006 15:20:50 +0000 |
| Subject: | #37962 [Fbk->Opn]: 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-99085@lists.php.net to get a copy of this message | ||
ID: 37962
User updated by: oriol dot gual at gmail dot com
Reported By: oriol dot gual at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Session related
Operating System: Windows XP SP2
PHP Version: 5.1.4
New Comment:
Isn't working either. But I have noticed some things:
If cookies are enabled it never works, but when cookies are disabled
and the SID is appended, it works randomly.
Hope it helps.
Previous Comments:
------------------------------------------------------------------------
[2006-06-29 18:04:53] mike@php.net
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
------------------------------------------------------------------------
[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