By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

session_start(): Cannot send session cache limiter - headers already sent

P: n/a

I'm getting this warning:

[15-May-2006 18:11:35] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
line 14 is this:

session_start();
why is that creating a warning?

May 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Rik
lawrence k wrote:
I'm getting this warning:

[15-May-2006 18:11:35] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandS
tartSession.php on line 14


http://nl2.php.net/manual/en/function.session-start.php
Note: If you are using cookie-based sessions, you must call session_start()
before anything is outputted to the browser.

Comment of header() is also applicable:
http://nl2.php.net/manual/en/function.header.php
Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank lines in a file, or from PHP. It is a very
common error to read code with include(), or require(), functions, or
another file access function, and have spaces or empty lines that are output
before header() is called. The same problem exists when using a single
PHP/HTML file.

Grtz,
--
Rik Wasmus
May 15 '06 #2

P: n/a

Rik wrote:
lawrence k wrote:
I'm getting this warning:

[15-May-2006 18:11:35] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandS
tartSession.php
on line 14


http://nl2.php.net/manual/en/function.session-start.php
Note: If you are using cookie-based sessions, you must call session_start()
before anything is outputted to the browser.


Yes, I know, but the error is pointing to a line that says only this:

session_start();

Is that not insane?

It's saying that headers were already sent in CommandStartSession.php
on line 14, but line 14 simply calls session_start().

I mean, what the hell?

May 17 '06 #3

P: n/a
Rik
lawrence k wrote:
Yes, I know, but the error is pointing to a line that says only this:

session_start();

Is that not insane?

It's saying that headers were already sent in CommandStartSession.php
on line 14, but line 14 simply calls session_start().


Lines in error reporting aren't always correct, sometimes you have to do it
the hard way.

Grtz,

--
Rik Wasmus
May 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.