note 61223 added to function.session-set-save-handler
| From: | php-general at lists dot php dot net | Date: | Sat, 28 Jan 2006 17:15:47 +0000 |
| Subject: | note 61223 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102625@lists.php.net to get a copy of this message | ||
As posted here (http://marc.theaimsgroup.com/?l=php-general&m=113833844422096&w=2) the
session module cannot handle objects anymore (tested in 5.1.2).
You have to add
> session_write_close();
at the end of your script to save the object values into the session.
This may indicate general problem. session_write_close() is called in the session module's
rshutdown() method, which is much too late: Since 5.1 the zend_object_store is cleaned before the
module's rshutdown hook is called. Furthermore it is not guaranteed that the session
module's rshutdown method is called before your module's rshutdown gets called.
In other words: Session shutdown seems to be broken in all PHP versions. It is better to always add
session_write_close() to the end of your scripts. This works with all php versions and it will work
with future versions of php whether or not this problem gets fixed.
----
Server IP: 64.246.30.37
Probable Submitter: 84.190.41.27
----
Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61223
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61223&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61223&report=yes
Search -- http://master.php.net/manage/user-notes.php