Re: header function odd behavior
| From: | Nilesh Govindarajan | Date: | Tue, 28 Jun 2011 04:20:33 +0000 |
| Subject: | Re: header function odd behavior | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313772@lists.php.net to get a copy of this message | ||
On 06/28/2011 09:10 AM, H Rao wrote:
> Hi,
>
> I am trying to understand odd(different) behavior of the header function
> under two different environments.
>
> Here is the code which I am trying to execute from two different servers
>
> <?
> header ("Set-Cookie: c1=value1;path=/; domain=.domain.com");
> header ("Set-Cookie: c2=value2;path=/; domain=.domain.com");
> ?>
>
> When executed from server1(OS X), both cookies are set in browser, but when
> executed from server2(Linux), only the second cookie is set.
>
> server1 and server2 are running different OS and php version as below. I
> know I could add $replace=false option on the Linux server, but I am trying
> to understand the different behavior of header() function on these two
> servers. Any thoughts?
>
<snip>
I don't have a clear idea about this because I always use setcookie(),
but something tells me that this has something to do with output
buffering and friends.
--
Regards,
Nilesh Govindarajan
@nileshgr