note 128107 added to sessionhandlerinterface.read

From: Date: Fri, 13 Jan 2023 01:22:31 +0000
Subject: note 128107 added to sessionhandlerinterface.read
Groups: php.notes 
Request: Send a blank email to php-notes+get-220061@lists.php.net to get a copy of this message
It appears that, if this function returns false, it causes "session_start(): Failed to read session data: user" to be emitted in the error log. This also seems to have a cascading effect that causes the write() method not to be called. So, returning false appears to only be for indicating an error state. To indicate that there is no existing session, but that it is okay to create one, it appears that returning an empty string is the way to go. ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.158.213 (proxied: 163.116.147.30) ---- Manual Page -- https://php.net/manual/en/sessionhandlerinterface.read.php Edit -- https://main.php.net/note/edit/128107 Del: integrated -- https://main.php.net/note/delete/128107/integrated Del: useless -- https://main.php.net/note/delete/128107/useless Del: bad code -- https://main.php.net/note/delete/128107/bad+code Del: spam -- https://main.php.net/note/delete/128107/spam Del: non-english -- https://main.php.net/note/delete/128107/non-english Del: in docs -- https://main.php.net/note/delete/128107/in+docs Del: other reasons-- https://main.php.net/note/delete/128107 Reject -- https://main.php.net/note/reject/128107 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220061) next »