Problem With Cookies

From: Date: Wed, 19 Jul 2006 17:01:29 +0000
Subject: Problem With Cookies
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-239588@lists.php.net to get a copy of this message
I have run into a wierd problem with cookies. I am trying to set a cookie as usual: $COOKIE_EXPIRES = 3600; $COOKIE_VALID_PATH = "/mydirectory/"; $COOKIE_DOMAIN = ".myhost.com" setcookie("mycookie1", "somevalue", time()+$COOKIE_EXPIRES, $COOKIE_VALID_PATH, $COOKIE_DOMAIN, 0) I want this cookie to be valid only for the directory /mydirectory in the server www.myhost.com. i.e. only for http://www.myhost.com/mydirectory/ The problem is that it works fine with IE 5.5 & Opera 8.5 & Firefox 1.5. But the cookies are not being accepted by IE 6 & Opera 9.0. And this is the header I captured through ethreal: Set-Cookie: mycookie1=somevalue; expires=Wed,19-Jul-2006 17:08:59 GMT; path=/ mydirectory/; domain=.myhost.com\r\n I am sure I am not doing something totally wrong because it works well with some versions. Are there any known issues with the later versions of IE and Opera. Thanks in advance. Prathap

« previous php.general (#239588) next »