![](http://www.studyzone4u.com/assets/image/ads6.jpg)
How we can increase default timeout of session ?
Last updated 5 years, 3 months ago | 1516 views 75 5
![Card image](/static/app-assets/images/sz4u-cover.jpg)
PHP | Increase default session timeout
The "session.gc_maxlifetime" is use to modify the default timout of session.
server should keep session data for AT LEAST 1 hour by using the below code. It increase session default timeout by 1 hour.
<?php
//3600 is use for 1 hour
ini_set('session.gc_maxlifetime', 3600);
?>