Hi,

I have a admin section with secure login and I want to make this section so that if the pages are idle for 30min the session will expire and they would have to login again.

I looked here: sessions

But now I'm not sure what I need to use. There is

session.cookie_lifetime
session.gc_maxlifetime
session.cache_expire

What are the differences between these and which should I use?

    Use session.cookie_lifetime to control the session lifetime, and make sure session.gc_maxlifetime is at least the same amount of time.

      NogDog wrote:

      Use session.cookie_lifetime to control the session lifetime, and make sure session.gc_maxlifetime is at least the same amount of time.

      tnx for the reply...
      Do I have to put this in each page?

        Either:

        1. Set it system-wide via php.ini (if you have access and you want it applied site-wide).

        2. Set it on a directory basis via a .htaccess file in that directory

        3. Set it on a per-script basis via [man]session_set_cookie_params/man and [man]ini_set/man before the session_start() call. (This might best be done in an include file called at the start of each script.)

          NogDog wrote:

          Either:

          1. Set it system-wide via php.ini (if you have access and you want it applied site-wide).

          2. Set it on a directory basis via a .htaccess file in that directory

          3. Set it on a per-script basis via [man]session_set_cookie_params/man and [man]ini_set/man before the session_start() call. (This might best be done in an include file called at the start of each script.)

          Tnx.. I set it system-wide. The session.gc_maxlifetime was already set to 1440 so I set session.cookie_lifetime = 1200.

          tnx again for the help

            Write a Reply...