note 94962 added to function.session-set-save-handler

From: Date: Fri, 04 Dec 2009 18:53:31 +0000
Subject: note 94962 added to function.session-set-save-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-163590@lists.php.net to get a copy of this message
When storing sessions in a DB, it's usually beneficial to use an existing custom DB object, but this creates problems with the latest version of PHP 5.3.1. This used to work fine on PHP 5.2.x (Linux and Windows). The problem now is that session_write_close() is not automatically called when execution ends, but rather after all the objects have been destructed, including the DB object! There are two ways around this, either manually calling session_write_close() at the end of your script(s), or not using the DB object. I'm sure this is the intended behavior from the beginning. ---- Server IP: 72.55.140.6 Probable Submitter: 208.124.206.146 ---- Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php Edit -- https://master.php.net/note/edit/94962 Del: integrated -- https://master.php.net/note/delete/94962/integrated Del: useless -- https://master.php.net/note/delete/94962/useless Del: bad code -- https://master.php.net/note/delete/94962/bad+code Del: spam -- https://master.php.net/note/delete/94962/spam Del: non-english -- https://master.php.net/note/delete/94962/non-english Del: in docs -- https://master.php.net/note/delete/94962/in+docs Del: other reasons-- https://master.php.net/note/delete/94962 Reject -- https://master.php.net/note/reject/94962 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163590) next »