Page 1 of 1

Sessions: How do I get rid of them?

Posted: Sat Jan 11, 2003 5:27 pm
by sdouble
I know that session_destroy() will delete them. This is what I am trying to do, but I want it to be automated. Someone told me I can set a time limit for sessions in the php.ini file. What line would I edit in there in order to do this? I tried the one I assumed it to be and reloaded Apache but it didn't seem to work. Basically I am wanting my sessions to expire and delete themselves and can't find any information about how to do it. Any help is greatly apreciated.

Thanks!

Posted: Sat Jan 11, 2003 6:04 pm
by Elmseeker
Here's what you need to find in php.ini:

Code: Select all

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 3600
There are also several other lines in that area of the file that you should look into, that is the section dealing with sessions.