[thelist] PHP Headers already sent error

Chris Blessing webguy at mail.rit.edu
Fri Nov 30 13:41:51 CST 2001

If you are outputing anything to the client (i.e. print, echo, etc.) then
you cannot print a header because they have already been sent to the client
(this happens right before you echo your content).  Check your functions to
make sure you're not printing/echoing/etc. (I often find old debugging code
that gets me on this one).

You can edit your php.ini file to allow for headers to be sent after
outputing content by enabling buffering (similar to Response.Buffer = true
in ASP) by changing this line:

output_buffering = On|Off

Choose on if you wish to enable this.  There are probably some other
considerations to make before doing this though, such as server resources
and what-not.

Chris Blessing
webguy at mail.rit.edu

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of wade
> Sent: Friday, November 30, 2001 2:29 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] PHP Headers already sent error
> Does anyone know what causes these errors?
> 1.) Warning: Cannot send session cache limiter - headers already sent
> (output started at
>                     /usr/local/pathname/functions.php:71) in
> /usr/local/pathname/login.php on line 18
> 2.) Warning: Cannot add header information - headers already sent by
> (output started at /usr/local/pathname/functions.php:71) in
>                     /usr/local/pathname/login.php on line 28
> I have an .inc file called functions.php that contains all the functions
> for the script.
> I also have a login.php and a config.php
> Now if I take out the includes I do not receive and error?
> Could anyone tell me why this is doing this and how to fix it.(PLEASE)
> Thank You
> --
> Should you have any questions, comments or concerns, feel free to call
> me at 318-338-2033.
> Thank you for your time,
> Wade Kelley, Design Engineer
> =========================================================
> Bayou Internet..............(888)
> 30-BAYOU...................http://www.bayou.com
> Mississippi Internet.......(800)
> MISSISSIPPI................http://www.mississippi.net
> Vicksburg Online..........(800)
> MISSISSIPPI................http://www.vicksburg.com
> =========================================================
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list