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!
Sessions: How do I get rid of them?
Moderator: General Moderators
Here's what you need to find in php.ini:
There are also several other lines in that area of the file that you should look into, that is the section dealing with sessions.
Code: Select all
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 3600