Search code examples
phpsessiontimeout

In php session is default for 1440second (24 min) so if user is active then also it's destroy by self?


  1. i start one session on login page.
  2. after successfully login user redirected to dashboard.
  3. so in session default time is 24 min so after that time if user is active then also session destroy or not?

is user login or logout?


Solution

  • Yes session is destroyed automatically after inactivity of 24 minutes by default.

    So in your case if user is active session will not get out.

    Still if you want to increase your session inactivity time you can use:

    ini_set('session.gc_maxlifetime', 3600);