Re: php script error

From: Date: Fri, 18 Jun 2004 11:33:13 +0000
Subject: Re: php script error
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-24021@lists.php.net to get a copy of this message
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@romtelecom.ro> To: susilo soewarno <susilo@suarapembaruan.com>, php-windows@lists.php.net Subject: Re: [PHP-WIN] php script error ----- Original Message ----- From: "susilo soewarno" <susilo@suarapembaruan.com> To: <php-windows@lists.php.net> Sent: Friday, June 18, 2004 8:56 AM Subject: [PHP-WIN] 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


« previous php.windows (#24021) next »