note 78428 added to function.session-set-save-handler
| From: | james at dunmore dot me dot uk | Date: | Thu, 11 Oct 2007 15:52:31 +0000 |
| Subject: | note 78428 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131307@lists.php.net to get a copy of this message | ||
I think it is very important here to stress that the WRITE method should use UPDATE+INSERT (or mysql
specific REPLACE).
There is example code "out there" that uses just UPDATE for the write method, in which
case, when session_regenerate_id is called, session data is lost (as an update would fail, as the
key has changed).
I've just wasted a whole day due to this (I know I should have thought it through / RTFM, but
it is an easy trap to fall into).
----
Server IP: 87.124.64.96
Probable Submitter: 193.128.117.15
----
Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php
Edit -- https://master.php.net/note/edit/78428
Del: integrated -- https://master.php.net/note/delete/78428/integrated
Del: useless -- https://master.php.net/note/delete/78428/useless
Del: bad code -- https://master.php.net/note/delete/78428/bad+code
Del: spam -- https://master.php.net/note/delete/78428/spam
Del: non-english -- https://master.php.net/note/delete/78428/non-english
Del: in docs -- https://master.php.net/note/delete/78428/in+docs
Del: other reasons-- https://master.php.net/note/delete/78428
Reject -- https://master.php.net/note/reject/78428
Search -- https://master.php.net/manage/user-notes.php