RE: [PHP] Cannot add header information - headers already sent

This is a discussion on RE: [PHP] Cannot add header information - headers already sent within the PHP General forums, part of the PHP Programming Forums category; Hi ermelir, Thanks for your quick response! The http://www.aurelis.org/store/checkout_form.txt file shows in the browser ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-12-2003
Frederik Feys
 
Posts: n/a
Default RE: [PHP] Cannot add header information - headers already sent

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é




Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:28 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0