tags:

views:

23

answers:

1

Here is the header from firebug that shows the scope of the PHP Session cookie:

Set-Cookie PHPSESSID=f0e2dfe56cc78be718c8154ac80d1ae2; path=/; domain=pix-all.com

But still the PHP Session cookie is been sent for any requests to static.pix-all.com

Cookie PHPSESSID=f0e2dfe56cc78be718c8154ac80d1ae2;

What could be the problem?

+1  A: 

If the cookie is set for the domain pix-all.com, then it will always be sent in requests to static.pix-all.com because static.pix-all.com is a subdomain of pix-all.com

So what is the problem? You're having issues because the cookie works as it's supposed to?

Mark Baker
my understating is that if you set the cookie domain to "pix-all.com" it should be sent only for this domain and if ".pix-all.com" then it should be sent for this domain and its sub-domains. What am i missing here?
Pablo
@Pablo the manual says `The domain that the cookie is available. To make the cookie available on all subdomains of example.com then you'd set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com will make the cookie only available in the www subdomain. Refer to tail matching in the » spec for details. `