note 77918 deleted from function.session-start by peehaa
| From: | peehaa@php.net | Date: | Fri, 09 Dec 2016 22:11:24 +0000 |
| Subject: | note 77918 deleted from function.session-start by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208331@lists.php.net to get a copy of this message | ||
Note Submitter: ehassler at synapsestudios dot com
----
At work we had an odd warning, "Cannot send session cache limiter - headers already sent".
In the following:
header('meta:1');
session_start();
the first header went across fine, but the session_start died with the warning.
What was happening was that the session contained an object which fired __autoload() when it was
unserialized. The __autoload() then included the file with the class definition, but that file also
output non-header text. This caused session_start() to be unable to add the session_id to the
headers.
This was difficult to find because we weren't able to see the text that was output from the
file that was __autoload()ed, only the warning.