Page 1 of 1
IE can't get cookies
Posted: Wed Jun 18, 2003 8:50 pm
by valen53
i face a problem, i running my system in local intranet. i have set the cookies to my system. Unfortunelly some of the pc cannot accept cookies no matter how i changing the internet setting.
It was not related to the IE version. b'cos i can run system in IE5 IE5.5 , IE6 also. i dunno where is occur error. b'cos i set the same setting to all of the PC.
anyone can give a comment ??? thank a lot.
Posted: Thu Jun 19, 2003 2:57 am
by cactus
Can you post the code for writing your cookies, may help us debug/understand what you are trying to achieve.
Regards,
Posted: Thu Jun 19, 2003 3:33 am
by delorian
Yes, I have got the same problems with cookies on WXP systems. No matter how insecure my settings are, from some sites I just don't get cookies. I think it's probably the M$ fault. But of course I can be wrong.
As for my tip I recommend using sessions instead of cookies. But you can also add your intranet sites to you Trusted Sites Sphere (I don't know if that's the way it's called in english Win version

) - then the cookies should be accepted
Posted: Thu Jun 19, 2003 4:01 am
by valen53
i just use a very simple set cookies function when user login system.
setcookie("ecm",$username,time()+3600);
if(!isset($ecm)) -> go to login page. else to index page
Posted: Thu Jun 19, 2003 4:07 am
by cactus
Supply the setcookie() method with ALL the paramters as per:
http://uk.php.net/setcookie
You can skip the last parameter (int secure), if your not using HTTPS (or don't intend using the secure option):
PHP Man wrote:Indicates that the cookie should only be transmitted over a secure HTTPS connection. When set to 1, the cookie will only be set if a secure connection exists. The default is 0.
Regards,