note 61223 deleted from function.session-set-save-handler by danbrown

From: Date: Sun, 23 Jan 2011 16:17:25 +0000
Subject: note 61223 deleted from function.session-set-save-handler by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176039@lists.php.net to get a copy of this message
Note Submitter: ---- 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.

« previous php.notes (#176039) next »