note 68728 deleted from function.session-cache-expire by googleguy
| From: | googleguy@php.net | Date: | Fri, 14 Sep 2012 05:33:50 +0000 |
| Subject: | note 68728 deleted from function.session-cache-expire by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190758@lists.php.net to get a copy of this message | ||
Note Submitter: info at ericbontenbal dot nl
----
you can change the max lifetime for a session with the function ini_set().
<?php
ini_set("session.gc_maxlifetime", "18000");
?>
This will set the max lifetime of the script to 5 hours. You have to use this in every script that
you want to change the default lifetime for.
if you want to know the lifetime of your current script, you can use:
<?php
echo ini_get("session.gc_maxlifetime");
?>