session IDs and multiple domains on one site
Moderator: General Moderators
session IDs and multiple domains on one site
I have one site which uses multiple domain names and multiple directories. When someone moves to a different dir and domain on the site they have to re-register because the session id is no longer available. If they move back to the previous domain, the old session variable is still active. The session ID seems to be tied to one domain (I believe) Is there a way to keep the same session ID over all directories and domains on the one site?
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
Easy solutions ...
I was hoping there was a setting in php.ini that I could change to relax the domain condition. I don't have access to my php.ini, so I can't experiment, whatever I tell the sysadmin I have to be pretty sure about.
Code: Select all
ini_set('session.cookie_domain', '.yourdomain.com');e.g.
http://www.yourdomain.com
forums.yourdomain.com
shop.yourdomain.com
yourdomain.com