RE: [PHP] Setcookies and redirect
| From: | Przem Kowalczyk | Date: | Sat, 02 Dec 2000 15:05:05 +0000 |
| Subject: | RE: [PHP] Setcookies and redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28365@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: vector@ogcs.com [mailto:vector@ogcs.com]On Behalf Of Andrea Resmini
> Sent: Saturday, December 02, 2000 3:52 PM
> To: PHP General
> Subject: [PHP] Setcookies and redirect
>
>
> Talking about cookies and headers
>
> >> doesn't work because you can't set any http headers before a redirect
> >> header.... as far as i know ....
>
> >Correct. But i have observed that sometimes it doesn't work even
> though no
> >output has been sent to the client.
>
> I observed a related behaviour on IE on Windows and Opera (Linux and
> Windows). Mozilla M18 Linux seems to have an herratic attitute towards
> this: sometimes it works, sometimes it doesn't.
> In brief: while Netscape 4.75 on Linux sets the cookie and redirects
> flawlessly (I use a technique similar to the one described in your
> pseudo-function: a script with no output is called, sets the cookie and
> redirects back), the other browsers actually do not redirect, but the
> cookie gets set (although Opera does not warn me of the cookie even with
> warnings on. Doh.), since reloading the page manually shows the change.
> I must admit that I'm a bit at loss here, and I am myself mightily
> interested in any further details on this matter.
I've observed the same behaviour of NS. After a few hours I've discoverd,
that if I hadn't sent full redirection path
(ie with protocol and host) the NS didn't reload the page (altough all
cookies were set and the whole script was right processed). On the other
hand some scripts redirs painlessly even if there was no proto and host, I
didn't find any rule in NS bahaviour.
So try redir to http://host.domain/address.php
Przem