note 106172 added to function.session-start
| From: | DarkAngel at osu1 dot php dot net | Date: | Sun, 16 Oct 2011 14:49:33 +0000 |
| Subject: | note 106172 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183911@lists.php.net to get a copy of this message | ||
I had script which should under CLI restore session set by web interface.
Spent like few hours understanding why script with session_id($sid) and session_start() is not
restoring session, but generating new one. No any notices or anything helping to resolve.
$sid was read from STDIN. Issue was that value from STDIN contained '\n' character at the
end, which is invalid for session identifier. Discovered by stracing CLI script.
Hope this will save you a lot of time.
----
Server IP: 69.147.83.197
Probable Submitter: 91.72.15.26
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- https://master.php.net/note/edit/106172
Del: integrated -- https://master.php.net/note/delete/106172/integrated
Del: useless -- https://master.php.net/note/delete/106172/useless
Del: bad code -- https://master.php.net/note/delete/106172/bad+code
Del: spam -- https://master.php.net/note/delete/106172/spam
Del: non-english -- https://master.php.net/note/delete/106172/non-english
Del: in docs -- https://master.php.net/note/delete/106172/in+docs
Del: other reasons-- https://master.php.net/note/delete/106172
Reject -- https://master.php.net/note/reject/106172
Search -- https://master.php.net/manage/user-notes.php