Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 & Netscape!
On 29 December 2001 13:35, Kris Wilkinson spaketh unto ye recipient: > setcookie ("myCookie","Blah","time()+7201"); For some reason, you must specify the domain, and make sure you use *exact* formatting on the time, including the GMT suffix. I gave up on setcookie and started using this: $date = gmdate("D, d-M-Y H:i:s", ($time)); header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT; path=/; domain='.$SERVER_ADDR); Problem is, I just upgraded a machine to Netscape 6.2 from 6.1, and now it won't set the cookie :( -- Casey Allen Shobe [EMAIL PROTECTED] GCS/CM d+ s+:->+: a-- C++() ULU$ P- L+++> E- W++ N++ !o K- w-- !O M V- PS++ PE Y+ PGP>++ t+ 5+ X R>+ tv-- b++ DI+ D G++ e h-(*) r--- z-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 & Netscape!
Oh yeah, about the lifetime of the cookie - with no valid expiry time it is created as a session cookie - which is supposed to only live as long as the browser does. [opening a new independent browser window does not share the session, but window.open() calls do, as do other 'browser created from browser with session' methods, if that makes any sense, ] -- Shane On Saturday 29 Dec 2001 6:35 pm, Kris Wilkinson wrote: > Just recently I've noticed an issue with setcookie. My scripts which > normall ran : > > setcookie ("myCookie","Blah","time()+7201"); > > Are killing the cookie immediately after you close the browser window, or > access another https:// site. It appears as though the life of the cookie > is actually not being set, and is based entirely around the life of the > browser window which it was originally called. > > if you leave the window open, and attempt at access the cookie from another > window, the cookie does not exist. > > IDEAS? PHP GODS? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 & Netscape!
Hi Kris Thats because you've wrapped the time() call and the addition inside a pair of doublequotes. Remove those and it'll work fine... Regards -- Shane On Saturday 29 Dec 2001 6:35 pm, Kris Wilkinson wrote: > Just recently I've noticed an issue with setcookie. My scripts which > normall ran : > > setcookie ("myCookie","Blah","time()+7201"); > > Are killing the cookie immediately after you close the browser window, or > access another https:// site. It appears as though the life of the cookie > is actually not being set, and is based entirely around the life of the > browser window which it was originally called. > > if you leave the window open, and attempt at access the cookie from another > window, the cookie does not exist. > > IDEAS? PHP GODS? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] setcookie BUG w/ IE 5.5, 6.0 & Netscape!
Just recently I've noticed an issue with setcookie. My scripts which normall ran : setcookie ("myCookie","Blah","time()+7201"); Are killing the cookie immediately after you close the browser window, or access another https:// site. It appears as though the life of the cookie is actually not being set, and is based entirely around the life of the browser window which it was originally called. if you leave the window open, and attempt at access the cookie from another window, the cookie does not exist. IDEAS? PHP GODS? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]