View Single Post

  #5 (permalink)  
Old 08-14-2003
Justin French
 
Posts: n/a
Default Re: [PHP] Cannot add header information - headers already sent

To be more descriptive than Marek, some text (in this case the TITLE)
has been sent to the browser around line 95 of header_aurelis.php. The
reason you are getting this warning is because PHP is trying to send a
header (redirect in this case) to the browser, but it cannot, because
the output has already started.

Clean up header_aurelis.php and make sure there's no browser output
before the redirect.

Yes, this means you might have to re-structure your script, or as a
last result, you may consider using the OB (out buffering) functions.


Justin


On Wednesday, August 13, 2003, at 06:52 PM, frederik feys wrote:

> What do you mean by "says it all"? On that line the page title is
> outputted.
>
> I suspect something is wrong with the handler file:
> http://www.aurelis.org/store/checkout_form_handler.txt
>
> When i call http://www.aurelis.org/store/checkout_form.txt
> for step 1 (i.e. client personal register form) checkout_form gives no
> "
> headers already sent". When the client proceeds to step 2 (i.e. an
> overview of purchase) the checkout_form_handler file is called.
> This does some calculations, etc.. and then redirects user to proper
> page using an header(location:) call.
> I suspect this step gives the "header already sent".
>
> -----Original Message-----
> From: Marek Kilimajer [mailto:kilimajer@webglobe.sk]
> Sent: dinsdag 12 augustus 2003 12:15
> To: frederik feys
> Cc: php-general@lists.php.net
> Subject: Re: [php] Cannot add header information - headers already sent
>
> output started at
> /usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95
>
> says it all. Look into the file at line 95.


Reply With Quote