note 81212 added to function.session-regenerate-id
| From: | spam1 at dyden dot de | Date: | Mon, 18 Feb 2008 22:05:03 +0000 |
| Subject: | note 81212 added to function.session-regenerate-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136253@lists.php.net to get a copy of this message | ||
When loading pages with a session call simultaneously oder immediately following each other (or
reloading the same page extremely quickly) and using session_regenerate_id(), the second request
will still have the old session id, so it'll lose all data.
In my case, the user will be logged out, if the data is not what I expect it to be.
I had this problem for a long time until I figured out that session_regenerate_id() was the culprit.
I doubt that there is an easy fix, maybe calling session_commit() early can make the possible reload
interval even smaller, but if the change isn't big, I'll simply leave
session_regenerate_id() out, because the data I handle is not extremely secure, but there might be
reloads in really short intervals (Ajax app.).
----
Server IP: 87.238.162.147
Probable Submitter: 213.219.184.107
----
Manual Page -- http://www.php.net/manual/en/function.session-regenerate-id.php
Edit -- https://master.php.net/note/edit/81212
Del: integrated -- https://master.php.net/note/delete/81212/integrated
Del: useless -- https://master.php.net/note/delete/81212/useless
Del: bad code -- https://master.php.net/note/delete/81212/bad+code
Del: spam -- https://master.php.net/note/delete/81212/spam
Del: non-english -- https://master.php.net/note/delete/81212/non-english
Del: in docs -- https://master.php.net/note/delete/81212/in+docs
Del: other reasons-- https://master.php.net/note/delete/81212
Reject -- https://master.php.net/note/reject/81212
Search -- https://master.php.net/manage/user-notes.php