SetCookie weirdness
| From: | Tomaz Kovacic | Date: | Tue, 19 Jun 2001 10:35:41 +0000 |
| Subject: | SetCookie weirdness | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54346@lists.php.net to get a copy of this message | ||
Hi!
Last night I've found some interesting cookie behavior. I was testing some
script on my local server, so
I used short version of domain ( http://www ) to reach local webserver. My
script stopped working, so I started to investigate a little bit what's goin
on..
I've managed to get my script working only when i user SetCookie command
with only 3 parameters:
SetCookie ("mycookie", $cookie, time()+1200);
My usual form of setting cookie is with all 6 arguments like:
SetCookie("mycookie", $cookie, time()+1200, "/", ".domain.com", 0);
But if I use longer form if domain: www.local (same as www.somedomaing.com)
my longer form of setting cookie started to work again.
Weird.
Anyone experianced similar problems?
Tomaz