Alex Rivera | Logout

Apache making the session time out longer

Asked 2011-06-12T19:37:34.477
9

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?

Edit
Report

1 Answer

11

do you also have set session.cookie_lifetime = 0 ? and maybe somewhere in your scripts or some included scripts the session lifetime is set to another value?

The default "0" value means that the cookie stays alive until the browser is closed. This is also the default value, if not set in php.ini. Source: http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime

answered 2011-06-12T19:44:51.393

Your Answer