Reputation: 481
I am trying to set the session expiry in PHP but when I run phpinfo();
it's not reflecting the change
// server should keep session data for AT LEAST 1 hour
ini_set('session.gc_maxlifetime', 3600);
// each client should remember their session id for EXACTLY 1 hour
session_set_cookie_params(3600);
session_start();
I have had a look around, but can't seem to find what I've done wrong.
Upvotes: 0
Views: 44
Reputation: 66
below code show me 5555 only in the output of phpinfo
// server should keep session data for AT LEAST 1 hour
ini_set('session.gc_maxlifetime', 5555);
// each client should remember their session id for EXACTLY 1 hour
session_set_cookie_params(5555);
phpinfo();
Upvotes: 1