ID: 23764
Updated by: sniper@php.net
Reported By: mfoxx at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: RH 6.2
PHP Version: 4.3.0
New Comment:
You never change the session name in your scripts,
so of course the last accessed script is the active one.
(the cookie name is propably PHPSESSID always.)
Please ask further support questions elsewhere, this is not a bug.
Previous Comments:
------------------------------------------------------------------------
[2003-05-23 09:22:33] mfoxx at hotmail dot com
OK, so I found an idle deval server with the same OS and php 4.3.0
(relatively much more recent) on it. Tested the test scripts on it. Let
me state that in my first posting, I misspoke slightly about the
behavior. When I said that window "A" lost its session entirely when
window "B" was launched, that was incorrect. What actually happens is
that window "A" looses its ORIGINAL session association, and
immediately takes on the new session id set in window "B". The two
windows are apparently inextricably connected since one launched the
other. :(
In any case, I still found some weird/unexpected behavior with the way
the session files are created and updated. Here's a step by step trace
of what I did:
window "A", loaded with myscriptA.php - screen output:
blah
e373b944e16776e47a365d455f4fcc02
Launch B
session file on server:
/tmp/sess_e373b944e16776e47a365d455f4fcc02
test|s:4:"blah";
************************************************************
clicking "Launch B",
opens window "B", loaded with myscriptB.php - screen output:
newwindowB
newTest
now, two session files exist:
/tmp/sess_e373b944e16776e47a365d455f4fcc02
test|s:4:"blah";
/tmp/sess_newwindowB
notice the sess_newwindowB file is blank right now. WHY DIDN'T session
newwindowB get the "newTest" string assigned to test and stored into
that session variable?
As seen later, the behavior should be that any change to the session
should get immediately (at the end of script execution) written back to
the session file on the server, right?
************************************************************
leaving window "B" open, switch back to window "A", click refresh -
screen output:
blah
newwindowB
Launch B
both session files still exist:
/tmp/sess_e373b944e16776e47a365d455f4fcc02
test|s:4:"blah";
/tmp/sess_newwindowB
test|s:4:"blah";
notice NOW that sess_newwindowB, instead of getting the "newTest" in it
from window "B", has "blah" in it from the refresh of window "A".
************************************************************
refresh window "B", output in window B stays the same, then refresh
window "A" again - screen output:
newTest_more
newwindowB
Launch B
it's now obvious that sess_e373b944e16776e47a365d455f4fcc02 has been
abandoned and is not being updated. its data remains the same.
/tmp/sess_newwindowB
test|s:12:"newTest_more";
notice that sess_newwindowB has not only "newTest" in it, which was
surely from the refresh of window "B", but on the refresh of window
"A", "_more" was added to the end of the variable and written right
back to the session file.
This is different than in the second step when window "B" changed the
session the first time, which apparently didn't change the session file
immediately as expected.
------------------------------------------------------------------------
[2003-05-22 20:30:40] rasmus@php.net
Look at the bug number for this bug report please. Yes, this is the
23,764th report filed. I don't know why you think installing a recent
version of PHP and checking whether the problem still exists is a waste
of your time. You are helping us trying to solve *your* problem. You
damn well better be willing to put some effort into this and by whining
that it is a waste of your time you are making sure that none of us are
going to waste any of ours helping you. We have 23,763 other reports
we can go deal with.
And yes, I have read through your entire report. Why in the world are
you not dumping the cookies that get sent from PHP and the ones that
get sent from the browser and telling us what the cookie exchange looks
like? And what do the session files in your session directory look
like for the two sessions? Do a little bit of homework please and give
us something to go on.
------------------------------------------------------------------------
[2003-05-22 20:16:59] mfoxx at hotmail dot com
I'm saying it seems wasted to install a whole new installation of PHP
to test 10 lines of code, when someone with it already installed could
test it in like 3 minutes for me and point me in the right direction.
And noone said anything about you having to prove anything, I just
expected maybe you'd have some common courtesy and either point out
where it had been fixed, or test yourself to see if it had been fixed.
You took like 3 seconds to look at the 4.0.6 and just dismissed it.
That's sad and unprofessional.
Be that as it may, I'll play that game. I'll waste my time to install
the latest and greatest from PHP, and when I get the same problem, I
expect to have some more decency shown toward a loyal and well-versed
supporter of the language.
------------------------------------------------------------------------
[2003-05-22 20:08:24] rasmus@php.net
This is not a tech support system. This is a bug system. It is up to
you to prove to us that there is a bug and not up to us to prove to you
that there isn't a bug. Why is it hard for you to test your "simple"
scripts on a recent version of PHP? Are you saying that you don't have
a single development machine on which you can install the latest PHP
and test this stuff yourself? If so, that is definitely not our
problem.
------------------------------------------------------------------------
[2003-05-22 20:05:48] mfoxx at hotmail dot com
How can you call this a useful system if you all take the easy way to
answer everyone's question?
------------------------------------------------------------------------
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/23764
--
Edit this bug report at http://bugs.php.net/?id=23764&edit=1