note 112681 added to function.session-write-close

From: Date: Fri, 12 Jul 2013 07:45:35 +0000
Subject: note 112681 added to function.session-write-close
Groups: php.notes 
Request: Send a blank email to php-notes+get-195581@lists.php.net to get a copy of this message
An easy gotcha here - the $_SESSIONS superglobal does not vanish because you call session_write_close. If subsequent to the write_close call if you manipulate the superglobal the changes will not be saved when the script exists. Likewise a call to session_regenrate_id will fail. Closing the session and then manipulating session variables is not something many would do by intent. However, if your sessions suddenly start misbehaving, failing to record changes etc it is well worth checking that the cause is not this one! ---- Server IP: 69.147.83.199 Probable Submitter: 83.99.68.163 ---- Manual Page -- http://php.net/manual/en/function.session-write-close.php Edit -- https://master.php.net/note/edit/112681 Del: integrated -- https://master.php.net/note/delete/112681/integrated Del: useless -- https://master.php.net/note/delete/112681/useless Del: bad code -- https://master.php.net/note/delete/112681/bad+code Del: spam -- https://master.php.net/note/delete/112681/spam Del: non-english -- https://master.php.net/note/delete/112681/non-english Del: in docs -- https://master.php.net/note/delete/112681/in+docs Del: other reasons-- https://master.php.net/note/delete/112681 Reject -- https://master.php.net/note/reject/112681 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195581) next »