Re: PHP4 & Session

From: Date: Fri, 25 Aug 2000 15:38:22 +0000
Subject: Re: PHP4 & Session
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13682@lists.php.net to get a copy of this message
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


« previous php.general (#13682) next »