Apache making the session time out longer

Viewed 57030

I already altered my php.ini in Apache to have these settings:

session.gc_maxlifetime = 1440
session.cache_expire = 1500

But my sessions are not that long. The problem is that I am not certain which settings would "do the trick"

Ideally I am looking for the right configuration to have the session last 12 hours. Could anyone help me with that?

3 Answers

session.gc_maxlifetime is measured in seconds, so your setting of 1440 will expire after 24 minutes. (see: http://php.net/session.gc-maxlifetime)

For 12 hour session I believe you need:

session.gc_maxlifetime = 43200
session.cache_expire = 720
session.cookie_lifetime = 0 
Related