#33130 [Fbk->Opn]: Odd behavior with session handling
| From: | steve at gamesareforchildren dot com | Date: | Tue, 24 May 2005 22:22:58 +0000 |
| Subject: | #33130 [Fbk->Opn]: Odd behavior with session handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79457@lists.php.net to get a copy of this message | ||
ID: 33130
User updated by: steve at gamesareforchildren dot com
Reported By: steve at gamesareforchildren dot com
-Status: Feedback
+Status: Open
Bug Type: Session related
Operating System: Windows XP SP2, all updates
PHP Version: 5.0.4
New Comment:
Oops, sorry - I specified the wrong directory.
The correct locations for the files are:
http://www.shoemakervillage.org/cd/20.html
http://www.shoemakervillage.org/cd/20.php
http://www.shoemakervillage.org/cd/21.php
I also forgot to mention about the trans_sid setting - I tried it a
while ago. Unfortunately, it did nothing - my understanding was that
the ID would be contained in the URL. Even with it set to 1 and
use_cookies set to zero, it must have still been using cookies because
no URL identifier was included.
Also, I spent another few hours thinking there was still something
obvious I overlooked, and set up PHP for the IIS server.
You can try that one out at
http://www.shoemakervillage.org:81/php/20.html.
The source is the same
as on the Apache server. I get similarly unpredictable results - but
interestingly I discovered that on both installations if I pressed
"Back" after getting to 21.php, the print_r command on 20.php would
print out all three values. If I then tried to re-enter the "Surname"
value into 20.php, the "Name" value would again disappear.
Hope this helps,
-Steve
Previous Comments:
------------------------------------------------------------------------
[2005-05-24 23:55:59] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
I get 404 Not Found for both URLs.
Also, set session.use_trans_sid On and try again.
------------------------------------------------------------------------
[2005-05-24 19:31:07] steve at gamesareforchildren dot com
I misunderstood what "expected result" meant. If things were working
correctly, the array would contain all the variables, even from
previous pages. In reality, it contains only variables added to the
session array in the current page.
------------------------------------------------------------------------
[2005-05-24 19:29:42] steve at gamesareforchildren dot com
Description:
------------
After spending 25 hours over three days reading through thousands of
websites and attempting every configuration change imaginable,
including downgrading PHP and Apache and then re-upgrading, I can only
conclude that this issue is a bug.
Look at the files provided and try out the forms. In most cases, the
session data is not carried across pages. session_start() is being
called in all instances. Files are indeed being created in the
directory specified in php.ini, but they also contain only the data
from the most recent page; it's as if the old data is somehow being
lost. Yet, in Firefox, at least, I can see that a PHPSESSID cookie has
been created, yet the data displayed in the browser is still incorrect.
The only clue I got was that this issue might have something to do with
virtual hosts, but I spent three hours on that alone and was unable to
resolve the problem; disabling virtual hosts is not an available
solution. The problem did not arise until I purchased and configured
an additional domain name for this server.
Here are some additional statistics if they are of use:
OS: Windows XP SP2, all available updates installed
PHP: version 5.0.4 (downgrade fails to fix problem)
Apache: version 2.0.54 (downgrade fails to fix problem)
Other applications running: RealVNC, WinWebMail E-Mail server,
Activeworlds world server software, and IIS 5 (on port 81)
Router problems are not an issue, because I set this computer as the
DMZ.
Reproduce code:
---------------
http://www.shoemakervillage.org/20.html
Code is located at http://www.shoemakervillage.org/20.txt,
http://www.shoemakervillage.org/21.txt
PHP INI is at http://www.shoemakervillage.org/php.ini
httpd.conf is at http://www.shoemakervillage.org/httpd.conf
Expected result:
----------------
Array will not contain session variables brought over from previous
pages. In IE, the array will sometimes contain previous variables. In
Firefox, the array never contains previous variables. Tested using web
browsers from three systems.
Actual result:
--------------
Array ( [Surname] => Steve2 [Submit] => Submit )
"Name" is not contained in the array.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33130&edit=1