OK, I have seen some of these messages before, now to figure out how you are
triggering them.  Some of these suggestions may be specific to previous
releases of PHP and may no longer apply but here goes;

1.  Make sure you have no stray or blank characters in your PHP file prior
to the "<?php" tag.  Any characters found outside the tags are sent to the
browser and may be causing PHP to give you the message that it can't send
headers, since it's already sent those characters.

2.  The message may actually be startup logic of PHP, and you need to do an
echo before the session_start(), to see if the error message is before your
echo.  You may also notice that the echo will actually trigger the message.

3.  Are you using any session_handler routines (say to store your session
data in a database).  Sometimes those routines can generate output before
the cookies have been sent.

4.  Curious about your error message which cites your url as "xxxxx.php4:1",
don't think I've ever seen the ":1" notation before.  If that :1 is a line
number reference as to where output was started, it could mean that the
first line of that file contains your offending characters (see #1 above).

hope this helps,

Warren Vail


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 10:25 AM
To: Vail, Warren; [EMAIL PROTECTED]
Subject: RE: [PHP] Cannot send session cache limiter


> perhaps you could show some code snippets.

Thanks Warren, at least I know my message is getting through :-)

Well, I just got this:

Warning: Cannot send session cookie - headers already sent by (output
started at /home/sites/site191/web/test2/changeAlertDetails3.php4:1) in
/home/sites/site191/web/test2/navigationStart3.php4 on line 4

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/sites/site191/web/test2/changeAlertDetails3.php4:1) in
/home/sites/site191/web/test2/navigationStart3.php4 on line 4

Just after session_start()


from the code:

        <?php
        include 'navigationStart3.php4';

where the first lines of navigationStart3.php4 are:

<?php
// session management stuff
// creates a session or resumes one based on current session id that's
being passed through get, post or cookie.
session_start();
echo ("<p>Just after session_start()</p>");

And that was on first running of a test program with lots of other stuff
stripped out. So it's no longer about the 'second and subsequent times
around', it seems to happen first time too. I'm closing IE6 each time, and
I've 'removed cookies' too.

I think my head's full, so I'm going to leave it now, but I'll be back to
work on it at the weekend. Any clues would be appreciated.

Happy new year,
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to