Expire session after 3 mins.

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!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Expire session after 3 mins.

Post by ianhull »

Could someone please tell me how long this is?
I would like to expire the session after 3 minutes.

Code: Select all

ini_set('session.gc-maxlifetime', 60*30);
Thanks in advance
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Expire session after 3 mins.

Post by Darhazer »

60 * 3
the number is in seconds :)
Peter Kelly
Forum Contributor
Posts: 143
Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:

Re: Expire session after 3 mins.

Post by Peter Kelly »

60*30 = 30 Minutes
60*3 = 3 Minutes :)
Post Reply