Re: php script error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Or setting some cookies. Try using output buffering.


See: http://www.php.net/manual/sl/ref.outcontrol.php


-Mike



On Fri, 18 Jun 2004, Dascalu Marius wrote:


Date: Fri, 18 Jun 2004 09:32:01 +0300
From: Dascalu Marius <marius.dascalu@xxxxxxxxxxxxx>
To: susilo soewarno <susilo@xxxxxxxxxxxxxxxxxx>, php-windows@xxxxxxxxxxxxx
Subject: Re:  php script error

----- Original Message -----
From: "susilo soewarno" <susilo@xxxxxxxxxxxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Sent: Friday, June 18, 2004 8:56 AM
Subject:  php script error


Can you help me,

sometimes i got error message and it goes like this :
"Cannot add header information - headers already sent by (output started
at C:\phpnuke\html\mainfile.php:42) in C:\phpnuke\html\mainfile.php on
line 171"

For additional info, right now i'm using IIS not Apache Web Server

Best Regards,


Susilo


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Hi Susilo,


I think you have issued header("something") after you send some output.
From PHP Manual:
http://www.php.net/manual/en/function.header.php

<Quote>

Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank lines in a file, or from PHP. It is a very
common error to read code with include(), or require(), functions, or
another file access function, and have spaces or empty lines that are output
before header() is called. The same problem exists when using a single
PHP/HTML file.

<html>
<?php
// This will give an error. Note the output
// above, which is before the header() call
header('Location: http://www.example.com/');
?>
</Quote>

HTH

Marius

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux