PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i'm looking for a script or method of how i can change the session timeout in the code. at the moment the session times out every 30 minutes via the server setting. how can i override this and set the session to timeout after 20 minutes. i want to code this into my template rather than set it in the php.ini file.
Im not too sure if theres a way to participate this with code. instead I think you would have to edit the php.ini file. Im not to sure on this so please don't take what I said to truth.
Just store a datestamp as a session var, update it each time you hit a script and check it against current time to see if the last hit was too long ago.
although this still won't let it last past the time set in your php.ini file.