On Mon, 3 Jun 2002, Jason Dulberg wrote:

> The subdomain's are all on the same server and all have their docroot set to
> the same directory. I'm mainly using subdomains as a way to keep the site
> organized and to have different graphics based on their sport location.
> 
> So if I pass to the next subdomain, do I just use session_start() if the
> person is logged in with sessions??
> 
> Thanks for your help!

<underline>I'm guessing</underline> 'no'. The sessions are kept on a per domain basis. 
Using a separate domain will cause a new session to be started when you do 
session_start() in the appopriate sport subdomain. So when you redirect from 
MAIN->FOOTBALL, send with a POST/GET the memberid of the autenticated user so that you 
can register this in the new session you start under FOOTBALL. Can't tell how safe it 
is though...

That was my 2c.

cheers,
--thalis

> 
> Jason
> 
> 
> 
> > I'm guessing that your "redirection to the appropriate subdomain"
> > actually refers to a different instance of the webserver
> > potentially on a different machine? If so, then that's why "the
> > session is lost". Sessions are maintained on a per server basis
> > (am I correct here?)
> >
> > Even so, you can redirect to a specific page in the appropriate
> > sport tld and reconstruct/restart the session (I guess to that
> > point you should only have a memberid after the authentication).
> >
> > cheers,
> > thalis
> >
> >
> > On Mon, 3 Jun 2002, Jason Dulberg wrote:
> >
> > > 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 subdomain,
> > > 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
> > > http://extreme.nas.net
> > >
> > >
> > > --
> > > 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

Reply via email to