Session Timeout in PHP

This sections will contains code regarding different PHP & MySQL features and contains help about php/mysql issues.

Session Timeout in PHP

Postby Web Guru on July 24th, 2008, 8:12 am

If you need to increase the session timeout time for php pages, then simply add the following php line on every page before starting the session.

The value is in seconds. 18000 means 5 Hrs.
Code: Select all
<?php
ini_set("session.gc_maxlifetime", "18000");
?>
User avatar
Web Guru
 
Posts: 68
Joined: March 24th, 2008, 7:59 am
Location: Lahore, Pakistan

Return to PHP / MySQL / XML

Who is online

Users browsing this forum: No registered users and 0 guests

cron