> I am using Sessions to secure parts of my website. I need to know if > there is a way to set a lifetime for these sessions , so that they are > automatically destroyed when say the user is inactive for 30 minutes.
It's already there, the session.gc_maxlifetime setting (default is 1440 seconds). Actually, this will only work if garbage_collection works on your server. It's all explained on the session page. If gc doesn't work on your system, then register a timestamp in the session that get's updated with each action. Then just look for timestamps over 30 minutes old and make them log in again. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php