faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

243 of 374 people (65%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

how to rctify this warning Cannot send session cache limiter - headers already sent

Feb 24th, 2008 20:08
dman, Stephen van Egmond, aravind miryala, http://www.ttnr.org


"Headers already sent" is a generic whine produced by PHP to indicate that:
1. you are doing something that needs to send headers to the browsers
2. headers have already been sent
Session functions try to send out headers.
You need to do the session variable stuff before PHP has sent anything
to the user.
Please note that PHP can send output in non-obvious ways.  
Watch for extra carriage returns at the top and bottom of 
your include files.
This file:
---------
<?
   header("Location: ...");
?>
--------
Will produce a complaint that output has already been sent - the extra
carriage return at the top.