My PHP Sessions seem to time out after about 30 minutes to 1 hour. I want to make them last a day.
I've tried the following code to make them last longer:
In my .htaccess file, I added the following lines:
php_value session.gc_maxlifetime 86400
php_value session.cookie_lifetime 86400
php_value session.cache_expire 86400
In my code, I have the following lines:
ini_set('session.gc_maxlifetime', 86400); // Server should keep session data for AT LEAST 86400 seconds
session_set_cookie_params(86400); // Each client should remember their session id for EXACTLY 86400 seconds
session_start(); // Session ready to go!
Even after doing all this, the sessions still expire after 30 minutes - 1 hour. I've looked at several other questions on Stack Overflow about this problem, but none of them have worked for me. Thanks in advance for looking into this, I really appreciate it.