Re: session woes
| From: | Jason Barnett | Date: | Wed, 23 Mar 2005 17:54:24 +0000 |
| Subject: | Re: session woes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211398@lists.php.net to get a copy of this message | ||
Mignon Hunter wrote:
...
> [23-Mar-2005 09:04:47] PHP Warning: Cannot send session cookie - headers already sent by
> (output started at /var/www/htdocs/sess_downloads_p2.php:5) in /var/www/htdocs/sess_downloads_p2.php
> on line 60
> [23-Mar-2005 09:04:47] PHP Warning: Cannot send session cache limiter - headers already sent
> (output started at /var/www/htdocs/sess_downloads_p2.php:5) in /var/www/htdocs/sess_downloads_p2.php
> on line 60
Your script has output on line 5. (it's possible that this is
whitespace character(s) as those count as output as well).
<mr_obvious>You currently are trying to send headers after you already
sent output. This is a problem because PHP thought it already sent all
of the headers, but oops, it didn't!</mr_obvious>
If the output buffering answer doesn't work for you then you should go
back to line 5 and verify / eliminate the output that is produced on
that line.
Or you can move the session_start() and / or other functions that are
sending headers before output on line 5. There's more than one way to
skin this cat.
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc