I've got a site setup that has a couple of different subdomains in addition to the top level domain. Each of these subdomains is a CMSMS installation as is the top level domain. I want my PHP sessions to be cross domain so that once the user has a session, they can move between each of the subdomains and the top level domain without new sessions being created. There are a couple of different ways to do this:
1.) php_value session.cookie_domain .example.com in the .htaccess file (our host doesn't allow this one)
2.) session.cookie_domain = ".example.com" in the php.ini (which is what I'm doing)
3.) ini_set('session.cookie_domain', '.example.com' ); (done before session_start on every page).
I have tried the first two and neither seems to work. The 3rd one seems impractical in this case. Does anybody have an idea about why this isn't working? I've done this sort of thing before, but never on a set of CMSMS sites. Any help would be greatly appreciated.
Cheers,
Tripp
CMSMS and subdomain session
Re: CMSMS and subdomain session
I know I already solved how to do this ... I'm not sure where it is but I know it's in this forum, and I'm short on time.. Hope that helps... Cheers -Jeremy
Re: CMSMS and subdomain session
Basically, we have parallel subdomains and I'm storing session information that would be nice to have across all of these subdomains as well as the tld. What I don't understand is why it's not working. The techniques above are very straight-forward and I've used them before. I don't know if CMSMS is interfering with this or not, just a speculation at this point. Jeremy, thanks, I'll see if I can't find your earlier thread. In the meantime, anybody else have a solution or some ideas? Thanks again.
Tripp
Tripp
Re: CMSMS and subdomain session
FWIW you can't in practice do a cross tdl cookie... trust me on that.. it's not that it's impossible.. It’s that you have to line of so many things that you'll spend many costly hours doing this... if you wish to know why you "can't" read here...
Hope this helps
Jeremy
Hope this helps
Jeremy