I have the following code to extend my $_SESSION[]
variables. They expire after around 2-3 hours.
I tried to extend to 22h by changing the session.gc_maxlifetime
, but im still losing my session after a couple of hours.
//start sessions
ini_set('session.gc_maxlifetime', 60*60*22); // 22h - one day
//Output just to make sure config was changed.
echo ini_get("session.gc_maxlifetime");
session_start();
How do I increase the duration of my session?