Apache makes session longer

I already changed my php.ini in Apache to have the following settings:

session.gc_maxlifetime = 1440
session.cache_expire = 1500

But my classes are not so long. The problem is that I’m not sure which settings will "succeed"

Ideally, I'm looking for the right configuration so that the session lasts 12 hours. Can anyone help me with this?

+7
source share
3 answers

Did you also set session.cookie_lifetime = 0? and maybe somewhere in your scripts or some included scripts the session lifetime is set to a different value?

"0" , cookie . , php.ini. : http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime

+10

:

session.cookie_lifetime x

x -

, , , /tmp - script. /tmp 10 .

+1

session.gc_maxlifetime is measured in seconds, so the setting for 1440 expires after 24 minutes. (see: http://php.net/session.gc-maxlifetime )

I believe for a 12 hour session:

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

All Articles