Re: HEADER PROBLEM OR MISCONFIGURATION
| From: | Andy Hoffman | Date: | Wed, 25 Oct 2000 18:32:43 +0000 |
| Subject: | Re: HEADER PROBLEM OR MISCONFIGURATION | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-3470@lists.php.net to get a copy of this message | ||
Serkan wrote:
> HI all..
>
> I have a question..(nope you cant win something..but U can help)..I am struggling for days
> with this problem..
>
> When I set a cookie with setcookie("something , aloha") and I parse it I get the
> following message:
> Warning: Cannot add header information - headers already sent by (output started at
> c:\program files\apache group\apache\htdocs\test.php:2) in c:\program files\apache
> group\apache\htdocs\test.php on line 36 ...
>
> Line 36 says..setcookie("visit_id", $visit_data[id], time()+(60*60*24*365*10),
> "/");
this error occurs when you try to call the "setcookie()" function after already sending
HTML content to the browser (headers must come before HTML content, by default)... make sure
you're not printing/echoing any
content (even blank lines between <?php ?> tags) before you call setcookie().
> another question..I think they are related to each....whenever I use
> <A href="somesite">go</a> in my script..dont matter if its as php file
> or html file I get the
> following message "The server encountered an internal error or misconfiguration and was
> unable to complete your request"...
> Did I misconfigure something in apache or php4?.....
This means there was a misconfig problem somewhere in apache... are you saying that your server will
display HTML pages, but NOT if there are links within the page? Maybe I'm mis-reading your
question.
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com