note 58403 added to function.session-start
| From: | Tom at osu1 dot php dot net | Date: | Thu, 03 Nov 2005 06:26:54 +0000 |
| Subject: | note 58403 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98009@lists.php.net to get a copy of this message | ||
I ran into a problem with user authentication and sessions today- I was using PW hash values as user
authentication and storing them as $_SESSION['pwhash'] for retrieval. But every time I
tried to access the value from a different page the $_SESSION['pwhash'] would shift the
H.L. bit by a small increment. say from 554b75a2848b39a9ae16abc24eaa1d73 to
514b75a2848b39a9ae16abc24eaa1d73
It seems like the problem was that I called the variable the same thing as I did in my SQL queries.
(the column name was also 'pwhash')
when I changed the session variable name to 'passcheck' it worked fine.
Apologies if this is standard behavior and i'm not helping anyone, but it drove me nuts for a
while.
cheers.
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58403
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58403&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58403&report=yes
Search -- http://master.php.net/manage/user-notes.php