Ask a Question related to PHP Bugs, Design and Development.
-
dpegasusm at gmail dot com #1
#20709 [Com]: Session variable getting mysteriously set
ID: 20709
Comment by: dpegasusm at gmail dot com
Reported By: DChri36990 at aol dot com
Status: No Feedback
Bug Type: Class/Object related
Operating System: Windows 2000
PHP Version: 4.2.3
New Comment:
i had a similar problem occur in PHP 4.4.4 where i called a variable
called $_SESSION['userID'] which had been previously set to the user's
ID number. later on in the script i set $userID to a value and it would
also set the session variable. strangely this mysterious resetting only
happened for one particular instance of setting $userID to a new value.
all other times it was reset it didn't affect the session variable. i
tried moving the entire site onto a second server to see what happens
and it worked fine there. both servers had the exact same
configuration. and were running Linux with Apache 1.3.37.
Previous Comments:
------------------------------------------------------------------------
[2002-12-08 10:19:35] [email]sniper@php.net[/email]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2002-11-28 22:09:12] [email]iliaa@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php4-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php4-win32-latest.zip[/url]
This is something that I believe was fixed in 4.3.0, please try the RC2
and report if the problem persists. Also, is you register_globals on?
------------------------------------------------------------------------
[2002-11-28 20:50:29] DChri36990 at aol dot com
When my code does the following in sequence:
1) $_SESSION['League'] = 1; /* or any other number */
2) unset($_SESSION['League']);
3) $League = new AnyObject(...);
The variable $_SESSION['League'] gets set to the contents of
"AnyObject".
This doesn't occur if the Session variable had never been set/unset,
nor does it occur when the Session variable has an existing value in it
when statement (3) occurs.
Addtionally, this assignment doesn't occur immediately at the time that
statement (3) is executed. It is somehow delayed until after the script
completes. It's only when I go on to execute another script when I
encounter the "mystery" assignment.
I haven't tried this with names other than 'League', but common sense
suggests this is likely a generic problem independant of the specific
name I happened to use.
FYI, I'm running Apache version 1.3, the latest stable release for
Windows. My PHP configuration is generic, with the exception of
including the module(s) required to do XML/XSLT transforms.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=20709&edit=1[/url]
dpegasusm at gmail dot com Guest
-
#39634 [NEW]: session variable and normal variable
From: erhanbaris at gmail dot com Operating system: Win Xp SP1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug... -
Cannot set session variable
I created a simple login script a some time ago which worked like a charm until I recently switched to a new web host that's running ColdFusion MX. ... -
session variable and IE
Hi there, I have a session variable that holds an user name, after user logs in. All works just fine in development environment (Intranet) for IE... -
Datalist - how (if) to use a sub variable or session variable in the footer?
Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple... -
[SESSION] Session variable deleted prior to command?
Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On...



Reply With Quote

