Jump to content

trouble with subdomain cookies and IE


bakedbean

Recommended Posts

I am setting a fairly standard cookie, but I need it to be available across subdomains. So as shown in the docs, I set the domain as ".domain.com".  In Firefox and Safari, this works fine, the cookie is available across all sub domains.  But in IE (6 and 7) the cookie isn't seen on any subdomains.  I've modified the IE privacy settings to allow 3rd party cookies, and loosened the security settings, but no luck... anyone else experienced something like this?  I have to think there's still some weird setting in IE that needs to be changed to allow this...?

 

My code:

setcookie("the_name","the_value",time()+4000,"/",".domain.com");

 

I have verified that the cookie is getting set, but only on http://domain.com, once I switch to a subdomain like "sub.domain.com" the cookie isn't there.

 

Any advice is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/116461-trouble-with-subdomain-cookies-and-ie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.