|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Session Timeouts
Just looking for the best way to handle session timeouts with php.
Note: I'm using the cookieless session method: PHP Code:
PHP Code:
Last edited by beetle18 : July 11th, 2002 at 11:40 AM. |
|
#2
|
|||
|
|||
|
are you trying to make it so it never times out?
|
|
#3
|
|||
|
|||
|
Not really. I'm new to PHP sessions though (and PHP itself). I just got sessions working on a little test web-app I'm making (using the method above). Do PHP sessions auto timeout? Or do I need to set it? I will need to be able to force timeout an idle session.
Also, my boss is concerned with security. Have I chosen an appropriate method for session handling to satisfy his concern? thanks |
|
#4
|
|||
|
|||
|
ahh, session timeouts are up to the server and its settings, usally its around about 20mins. if you want to force a timeout, use the session_destroy() function.
If you want to make something really secure, then what i suggest is that you use a database to store the session Id, IP address, username, password, etc, then make a function on each page to make sure that the session id and the ip address is correct, also you could store the name in the database, so that if you want their name or something, all you have to do is pull it out of the database WHERE sid=$sid and ip=$ip thats the basic idea, theirs a few ways to go about making a secure login system |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Session Timeouts |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|