note 96358 deleted from function.session-save-path by cmb

From: Date: Thu, 18 Apr 2019 06:32:30 +0000
Subject: note 96358 deleted from function.session-save-path by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-210612@lists.php.net to get a copy of this message
Note Submitter: TK ---- After a search for the cause of a issue causing users to have to login twice, I've found a call to session_save_path() was the culprit. What was happening was: the session save path was set, a session was opened, some variables were set and the session was closed. This was resulting in an empty file in the specified session save path and of course no session data on the next page load. Oddly, on the second attempt the data was saved as expected. I found that removing the call to session_save_path() resolved the issue. My final solution was to replace the call to session_save_path($path) with an equivalent call to ini_set('session.save_path', $path).

« previous php.notes (#210612) next »