Re: PHP4 & Session

From: Date: Fri, 25 Aug 2000 16:30:43 +0000
Subject: Re: PHP4 & Session
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-13690@lists.php.net to get a copy of this message
Actually, you can make the cookie be set for ".domain.com" instead of "secure.domain.com". If you do that, the cookie will be provided to any subdomain of .domain.com and you won't have to worry about this. The php.ini file contains session.domain or similiar. Quoting Chris Monson (chris@pagelaunch.com): > I've been pulling my hair out over something very similar over the last > few days. Here is what I have come up with. > > The login is done through a secure server, which is at a slightly > different url (a subdomain of our domain) so the cookie is not persisting. > > What I have done is set up my own session methods. When a read is done, > I test for the existence of a URL parameter. If it is there, I force a > setcookie on the session variable. That way there is a cookie set for > each of the domains and all is well. > > It's something to think about. I have written an extensive session > management module for connecting to MySQL and you are certainly welcome > to take a look at some of it (some of it is dependent on our local > database structure and probably wouldn't help you much) if you need some > help getting it to work. > > Chris > > Ben Meyer wrote: > > > I am trying to use sessions for my website, however, the pages are not > > recognizing that the session is occuring. Here's an outline of what happens > > and what is suppose to happen: > > > > What I would like to happen: > > > > User Login at Login page -> Login Page forwards to Site Index page -> User > > can choose where to go in the site with the information accounted for by the > > session. (Note: If user is not logged in, then send back to Login page.) > > > > What I see happening: > > > > User Login at Login page -> Login Page forwards to Site Index page -> Site > > Index things User is not logged in, and sends back to Login page. > > > > Can the meathod that I would like to use work with PHP4 Sessions? Or Do I > > have to create the session myself everytime the page opens? I have tried > > setting session.auto_start in the php.ini file, but it has not changed > > anything. > > > > Thanks in advance, > > > > Benjamen R. Meyer > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- aaron / aig4.com

« previous php.general (#13690) next »