Actually, if you are doing this then just re-login the person once they get
to the new domain. Then you have the login and the session.
PHP has the capability to allow you to replace the session handler. If you
have to have them login in one domain and then use the info in another,
building your own session handler is one way to do it. But if you have no
session info to pass, why is it a problem?
* Cal Evans
* Journeyman Programmer
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 3:08 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] 1 session, 2 subdomains
I am currently storing the session hash/login info (userid, session hash,
host, etc.) in the db and send it to the next domain in the redireted URL.
How would the handler work if no session info isn't being passed to the
> From: Cal Evans [mailto:[EMAIL PROTECTED]]
> Store your session information in a database. Assign it an ID and
> send that
> ID to the cookie or the URL in the new domain. Then you can
> write a session
> handler that retrieves the session info form the database.
> * Cal Evans
> * Journeyman Programmer
> * Techno-Mage
> * http://www.calevans.com
> -----Original Message-----
> From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 03, 2002 2:13 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] 1 session, 2 subdomains
> I am working on a sports website that will have a subdomain for each major
> sport. There is a login panel on the main domain that routes users to the
> appropriate subdomain depending on the sport that they are in. Everything
> seems to be ok with cookies (cookiedomain=.domain.tld) but I
> can't get it to
> work with sessions -- even if I pass the session id in the URL.
> In the login script, I define the session then route to the appropriate
> subdomain. This where the problem lies - after redirection, the session is
> lost. It appears that the session is defined for the domain name that the
> user signs in on - if I allow users to login on their given sport
> the session works ok, but this doesn't work the way I'd like.
> Any ideas on what I'm doing wrong?
> (I can post my login/session code if need be)
> Thanks for any suggestions!!
> Jason Dulberg
> Extreme MTB
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php