Bug #17846 Updated: Session randomly malfunctions
| From: | fabian at ahrberg dot se | Date: | Fri, 28 Jun 2002 23:39:23 +0000 |
| Subject: | Bug #17846 Updated: Session randomly malfunctions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12460@lists.php.net to get a copy of this message | ||
ID: 17846
Updated by: fabian@ahrberg.se
Reported By: fabian@ahrberg.se
Status: Open
Bug Type: Session related
Operating System: Linux 2.4 kernel
PHP Version: 4.2.1
New Comment:
Hmm... I spent a whole day looking into this. The sessioncookie is set
to die with the browser, and not time-out. HOWEVER: In 99% of the cases
the cookie looked just fine but in a few cases the cookie was set for a
limited lifetime even though it shouldn't. So I tried to use the
function session_cookie_set (or whatever it's called =) ) in case of
something mysterious and guess what? Since I set the lifetime to "0"
with this function, just before I call session_start, I haven't
experineced the problem and no vistor on the site neither... Hmm... so
the question is, why does the session-cookie sometimes show up with a
limited lifetime, when it in 99% shows up with what it should (till the
browsers closes)... hmm
Previous Comments:
------------------------------------------------------------------------
[2002-06-20 16:15:33] lance@metaldog.co.za
I have a similar problem with IE and a server on a local network. I
have 4.2.1 running on a dev system and on a live system on the net.
Exactly the same code is running on both systems and they have almost
identical setups. On the external system, I can maintain session state
everytime without problems... On the internal system my IE browser
sometimes and sometimes does not maintain a session.
Opera or Netscape do not have this problem at all to either system and
the session values are being sent properly... With IE, I have noticed
that the session id changes on each load of the session_start() so
logically it would indicate that its impossible to maintain state if it
keeps resetting itself.
The odd thing is that the same browser works to the external version of
the site which is on a much slower link.
This has occured almost every time, but occasionally things will go
through for a while and then stop. The problem ONLY happens with IE5.5
and 6 that I can tell.
very very frustrating and odd, because the code is working perfectly on
non-Ie browsers and even works sometimes with IE so it is almost
impossible to try and trace from a coding perspective
------------------------------------------------------------------------
[2002-06-20 08:55:50] fabian@ahrberg.se
The problem occurs with mozilla, ie, lynx, diffrent versions, diffrent
plattforms.
It's REALLY annoying since we run a forum and all kinds of functions
where our users really hate to be logged out when they've just finshed
a long letter, an auction whatever.
------------------------------------------------------------------------
[2002-06-19 22:50:38] yohgaki@php.net
It could be browser's fault.
I noticed my IE6 sends 2 cookies for the same cookie name, and PHP
couldn't initilize session as a result. And this is _very_ rare.
Check what is going on with packet sniffer when it happenned. It may be
browser's fault.
------------------------------------------------------------------------
[2002-06-19 14:05:25] fabian@ahrberg.se
When I run session_start() and let it create the sid in a cookie and
store the session data in files the session works just wonderful!
However,
For no reason at all the session just dies. Upon investigating I've
noticed that the cookie is still there as it should be, no diffrence
from when the session worked, and the same session with its data is
still there as a file.
In 99/100 cases the session works as it should and then, way random,
the cookie and the data on the server just can't seem to find eachother
through the session system.
At first I thought the problem was related to my session storage, I
used to store the sessions in mysql, but when I tried to see if it
dissapeared with files - it didn't.
I can't reproduce the problem as I find it all random. It can happen
anywhere at anytime when surfing the site im working with.
When I send the sid as a part of the url I can't manage to reproduce
the problem but maybe it's there as well, even if I don't think so.
Sum:
Sid stored in cookie + session -> works, almost always.
Any ideas?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17846&edit=1