Bug #17704 Updated: When the cookie on the client expires, the sessiongets messy
| From: | derick@php.net | Date: | Thu, 13 Jun 2002 17:13:42 +0000 |
| Subject: | Bug #17704 Updated: When the cookie on the client expires, the sessiongets messy | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10364@lists.php.net to get a copy of this message | ||
ID: 17704
Updated by: derick@php.net
Reported By: thiago@softexpert.com
-Status: Feedback
+Status: Bogus
Bug Type: Session related
Operating System: Windows 2000
PHP Version: 4.2.1
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-06-13 12:41:51] thiago@softexpert.com
Closin this BUG. The error was caused because i was using header()
after session_start(). Im sure its after :)
------------------------------------------------------------------------
[2002-06-12 08:55:19] sniper@php.net
What I was expecting was a short and complete example
script which can be used to reproduce this..
------------------------------------------------------------------------
[2002-06-11 22:11:57] thiago@softexpert.com
i wrote cooking, but i mean cookie.
and im using NTFS filesystem.
------------------------------------------------------------------------
[2002-06-11 22:08:30] thiago@softexpert.com
reopening it.. hope its better now :)
------------------------------------------------------------------------
[2002-06-11 22:04:25] thiago@softexpert.com
Ok.. let me explain it better..
I have a php script that creates a session with session_name() and
session_start(). This session is created with the default cookie expire
option which is "expires when the browser is closed". At the end of
this script (actually, its more than 1 file) the session is destroyed
with session_destroy(). When i execute (run) this script again (same
code) it creates 2 session ID on my session_save_path (where session
data is saved). One ID is the old expired ID and the other is the new
ID. The session data is stored on the old ID (the expired one) and
$_SESSION["var"] is read from the new ID. It doesnt return the expected
value because the value is on the old expired ID that shouldnt be
created again.
This happens when i close the browser (making the session cookie
expire) before executing (running) the script for the second time. If i
execute (run) it without closing the browser, it justs creates the same
ID and works fine which is the expected behaviour because the cooking
isnt expired.
So, the thing is, php is creating sessions based on expired session
cookies and its getting lost too because its making the expired (old)
sessions live again and its creating the new session too. And
everything gets messy.
Im using Windows 2000 with php 4.2.1. I tested it with I.E 6.0 and with
Mozilla 1.0. The web-server is IIS 5 with CGI.
register_globals is off.
Is it clear enought ?
thank you very much.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/17704
--
Edit this bug report at http://bugs.php.net/?id=17704&edit=1