[Phplib-users] Sharing sessions between domains
Brought to you by:
nhruby,
richardarcher
From: Peter C. <li...@kr...> - 2003-01-26 17:17:03
|
Hi I need some help: I'm working on a multilingual site that has different domains depending on whether the content is english or french (say english.com and francais.com). I want to allow a user who has logged-in in one domain to remain logged-in (and keep their session variables) when they move to the other. I'm having problems keeping the session-ID between domains (using session4, auth4). I know this must have come up before... I've had a look through the archives and found a brief discussion of this in May '02 which talked about some of the issues (including security), but didn't give an example, which I clearly need! My approach has been to get around the cookie domain issue by ensuring that when moving domains. the session id is included in the URL, and set $sess->fallback_mode to get. When I first move to the new domain, $sess->id appears to have been picked up OK from the URL (and my $auth preserved). But as soon as I move to another page, there's a new $sess->id, so I've lost my $auth info.... I've tried using $sess->id() for force the new Id, but that doesnt seem to help... so presumably, a cookie has been set (or not been set) somewhere. What else do I need to do? Or, does anyone know a place where I can find an example? Cheers Peter _________________ Peter Cruickshank |