note 37989 rejected from function.session-start by didou
| From: | didou@php.net | Date: | Thu, 04 Dec 2003 09:37:55 +0000 |
| Subject: | note 37989 rejected from function.session-start by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61392@lists.php.net to get a copy of this message | ||
Note Submitter: admin@wad-ac.no-ip.com
----
I was modifying a registration script today. I had 2 copies running, because one was being modified
and the other contained the original code that I would use as reference.
With the script I was modifying however, I kept getting:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at
c:\Apache\Apache2\site\test\test\registration_p.php:2) in
c:\Apache\Apache2\site\test\test\vdaemon.php on line 78
I tried everything I knew of. I tried to destroy the session before it started, I copied the script
I was calling (which also made the session) and renamed it. Nothing worked.
Then, I noticed one small difference in the two scripts. There was a single carriage return on the
top line before I started my <?php ?>. I removed it and everything worked just like it
should.
Moral of the story: Never have extra lines where they aren't needed.
Frankly, I'd like to know why it would do that just because of one empty line.