question about max session length

hi,i can’t manage to understand how to setup the max length of session for all users.if i want to force all users, to re-login every 3hours, is this the good setting :PHPMaker:
Session timeout period (minutes) : 180 (or 179 because the countdown)
Session keep alive interval (seconds) : 0
Session time out countdown period (seconds : 59php.ini:
session.gc_maxlifetime : 1440 (my default server)
session.cookie_lifetime : 600 (before i had 0)600 in session.cookie_lifetime, is meaning that the max time to fill fields in a page is 10min, isn’t it ?if i want 3hours max, i need to change 1440 to 10800 ?

amiens80 wrote:

Session keep alive interval (seconds) : 0

It must be set to a value larger than 0, for your case, you may change it to 10800.amiens80 wrote:

if i want 3hours max, i need to change (session.gc_maxlifetime) 1440 to 10800 ?

Yes, it is.

Read Session keep alive interval (seconds):

  1. For this setting to work, this setting MUST be SHORTER than the > session.gc_maxlifetime > and > session.cookie_lifetime > in php.ini, otherwise the session will be expired by PHP first. Do not set the interval too short, making requests to the server every 300-600 seconds (5-10 minutes) should be enough.
  2. To enable this feature, this setting must be set to a value larger than 0.

In your case, since your session.cookie_lifetime is 600, you must set Session keep alive interval shorter than that, e.g. 500.