CMSMS and subdomain session
Posted: Fri Jan 08, 2010 11:13 pm
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
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