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

Session error

P: n/a
Hi,

Just received the following error upon running some scripts that
utilize sessions. Don't know what it means by "cache limiter". Can
someone please clarify?

I have a script called "displaypreowned.php" that begins with
"session_start()" and a few lines later have a line
"include("databaseconnector.php")" and "include("stockdisplay.php")"
which in themself also have "session_start()" in it. Don't know if
these multiple "session_start()" caused the error. I tried a test
script with multiple lines of "session_start()" without problem so I'm
not too sure.

Warning: Cannot send session cache limiter - headers already sent
(output started at /stock/displaypreowned.php:8) in
/stock/displaypreowned.php on line 9
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Titus wrote:
Warning: Cannot send session cache limiter - headers already sent
(output started at /stock/displaypreowned.php:8) in
/stock/displaypreowned.php on line 9


You can't send HTML data before the headers (session_start(),
setcookie(), header(), maybe others).

Line 8 of /stock/displaypreowned.php sends HTML data
Line 9 tries to send a header.
Either remove line 8 or put it after line 9
or use output buffering
http://www.php.net/manual/en/ref.outcontrol.php

specifically the ob_start() function
http://www.php.net/manual/en/function.ob-start.php
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.