PDA

View Full Version : Sessions Across Subdomains


click
12-7-05, 11:31 PM
Hi All,

Ive been trying to get a session to persist across subdomains.
I have created a custom php.ini with extra's tool and had it symlink to the subdomains, changing session.cookie_domain to .foo.com

I start a session and store some variables with xxx.foo.com
This seems to work, as firefox is reporting a PHPSESSID cookie for foo.com

But then when i start a session with yyy.foo.com and dump $_SESSION to screen, i get:
array ()

what am i doing wrong?

extras
12-8-05, 11:02 AM
I'd check the value you set in php.ini is valid in the script using unu_get(),
and check the HTTP headers (where cookies are set and sent back) to see what's going on.