RE: [PHP] Cannot add header information - headers already sent
| From: | frederik feys | Date: | Tue, 12 Aug 2003 09:23:07 +0000 |
| Subject: | RE: [PHP] Cannot add header information - headers already sent | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159263@lists.php.net to get a copy of this message | ||
Hi ermelir,
Thanks for your quick response!
The http://www.aurelis.org/store/checkout_form.txt
file shows in the
browser with an empty first line: It may be an browser glitch. There's
actually no space in the php file, i.e. it starts at line 1 with <?.
I still receive the error. Any other thoughts?
Thanks
Fré
-----Original Message-----
From: ermelir [mailto:ermelir@ifrance.com]
Sent: dinsdag 12 augustus 2003 11:03
To: frederik feys
Subject: Re: [PHP] Cannot add header information - headers already sent
Hi,
the problem is your empty first line:
HTML header will be send if you call a function that send code to client
browser (ex echo or print function) or if you have a empty line between
php
tags. for ex if you have
--------- begin code
<?php
...
?>
-------- end code
the empty first line is send to browser, so the HTML headers are send
to;
remove this line, you won't have errors any more
----- Original Message -----
From: "frederik feys" <frederikfeys@pandora.be>
To: <php-general@lists.php.net>
Sent: Tuesday, August 12, 2003 10:59 AM
Subject: [PHP] Cannot add header information - headers already sent
Hi all,
I'm stuck with this one:
I have an checkout procedure: when people come to the overview page(step
2), they get:
Warning: Cannot add header information - headers already sent by (output
started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in
/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca
rtID.php on line 14
header_aurelis.php is where actual html output starts (template)
i had a similar problem in my cart. I solved this by adding at the top
of my script:
$cookie = GetCartId();
This doesn't do the trick now :-(
For your convenience i put the code here:
http://www.aurelis.org/store/checkout_form.txt
and a handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
Can anyone shed some light on this?
Thanks!
Fré