note 106509 deleted from function.session-start by cmb
| From: | cmb@php.net | Date: | Fri, 15 May 2015 19:38:33 +0000 |
| Subject: | note 106509 deleted from function.session-start by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202558@lists.php.net to get a copy of this message | ||
Note Submitter: james at ustelcom dot net
----
I had the infamous "Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent ..." error, and I was convinced it was because I was
trying to open a session AND send a cookie. I tried everything that was suggested, uploaded in
ANSI, uploaded in UTF 8, etc. I tried opening the session first, then sending the cookie first.
Turns out my problem was quite simple:
" <?php
session_start();
?>"
Do you see the problem with my code? I finally did:
" <?php"
^^------ There is an accidental space!
I'm sure I'm not the only one who encounters this problem. Hopefully this helps others!