note 77103 added to ref.session
| From: | johnpccd at osu1 dot php dot net | Date: | Wed, 15 Aug 2007 15:06:54 +0000 |
| Subject: | note 77103 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129496@lists.php.net to get a copy of this message | ||
I was having problems with sessions being changed weirdly in my site. I used to put 'id'
in $_SESSION when the user logs in using : $_SESSION['id'] = value;
And i used another variable called $id, i thought this never causes problems, but i did have
problems(i put some id in the session, and when i refresh the page and try to grab the value back, i
get another id) so i just replaced all $_SESSION['id'] by $_SESSION['sess_id']
and left the $id as is.
This solved all problems.
Note: While debugging this site on my local machine (i use WAMP) i never have this problem i can use
$id and $_SESSION['id'] apart from each other.
My php version is 5.2.3
The server's PHP version is 5.1.6
Is this a matter of versions??
----
Server IP: 69.147.83.197
Probable Submitter: 62.135.22.142
----
Manual Page -- http://www.php.net/manual/en/ref.session.php
Edit -- https://master.php.net/note/edit/77103
Del: integrated -- https://master.php.net/note/delete/77103/integrated
Del: useless -- https://master.php.net/note/delete/77103/useless
Del: bad code -- https://master.php.net/note/delete/77103/bad+code
Del: spam -- https://master.php.net/note/delete/77103/spam
Del: non-english -- https://master.php.net/note/delete/77103/non-english
Del: in docs -- https://master.php.net/note/delete/77103/in+docs
Del: other reasons-- https://master.php.net/note/delete/77103
Reject -- https://master.php.net/note/reject/77103
Search -- https://master.php.net/manage/user-notes.php