Re: Setcookie() and header()
| From: | Michael Sims | Date: | Wed, 15 Jan 2003 06:08:21 +0000 |
| Subject: | Re: Setcookie() and header() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131660@lists.php.net to get a copy of this message | ||
On Tue, 14 Jan 2003 22:34:49 -0700, you wrote:
>Unless I am mistaken, the typical behavior for most browsers is exactly
>as you described. Which is due to the browser receiving a Location
>header and acting on it, disregarding any other headers. (ex:
>cache/no-cache, cookies, etc)
>
>Anybody care to prove me wrong?
Actually most browsers can handle receiving a cookie and being
redirected in the same response. I have several applications that do
this and I have no problems in later versions of IE, Mozilla,
Netscape, or Opera (all that I can test with).
I would wager that the original poster is using IIS, and I would also
wager that they are running PHP in CGI mode, not ISAPI mode. IIS has
a bug that occurs when a CGI program tries to set a cookie and
redirect in the same response (detailed in Microsoft Knowledge Base
article Q176113), but there is a workaround. I sent a post to this
list back in August of last year which details the workaround:
http://marc.theaimsgroup.com/?l=php-general&m=102929828515647&w=2
If the original post isn't using IIS, then I'm not sure what's
happening.