Re: session_destroy problem

From: Date: Fri, 10 Jan 2003 15:57:41 +0000
Subject: Re: session_destroy problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-131125@lists.php.net to get a copy of this message
Session Destroy will work if you provide the user a way to log out of the website. But if the user closed the browser then that's it. Session Destory can't be used because the browser is a client side and Session Destroy is a server side. So, once the browser close, it doesn't contact the server before closing. You're only option is to clean up the session data from the webserver as I usually have done. I also use the database to find out about the session id and the timestamp it was updated. That way, I will know which session not to delete if it is active. "Ken Nagorski" <kenn@pcintelligent.com> wrote in message news:1106.66.93.13.118.1042146480.squirrel@secure.pcintelligent.com... > Hi there, > > So it is the browsers problem. I tested what you said and Mozilla acts as > you stated and IE does as well. I guess my question is. Is there no way to > close clear out the session when the user logs out? > > The way I set things up the class that I wrote just gets the current > sessionid and does a select from the database to see if it has been logged. > The problem this creates is that someone could sit down and reopen a > browser and have access to the site as if they where logged because the > session is not gone. > > Hmm - Like a said I have never used sessions before so I am learning about > them. Thank you for your input... > > Ken > > > > What browser are you running? I find that IE drops the session when > > you close the browser window actively working the site. On Mozilla I > > have to close every instance of Mozilla regardless of the site before > > it drops the session. Pretty aggravating so I'm going to have to start > > working on a method based on responses to your post. > > > > Larry S. Brown > > Dimension Networks, Inc. > > (727) 723-8388 > > > > -----Original Message----- > > From: Ken Nagorski [mailto:kenn@pcintelligent.com] > > Sent: Thursday, January 09, 2003 1:35 AM > > To: php-general@lists.php.net > > Subject: [PHP] session_destroy problem > > > > Hi there, > > > > I have written a class that manages sessions. I have never used > > sessions before so all this is new to me. Everything works fine as far > > as starting the session and logging in however when I call sessoin > > destroy it doesn't seem to work the function returns 1 as it should if > > all goes well however if I go to another page and do some other > > browsing even if I close the browser the session still hangs around. Is > > there something I don't know about sessions? I have read the > > documentation on the session_destroy function, I don't think that I am > > missing anything... > > > > Anyone have any suggestions? I am totally confused. > > > > Thanks > > Ken > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#131125) next »