Set Session Timeout Length

Set the Session Timeout for a logged-in user

CakePHP 4:

In config/app.php we can set the timeout.

'Session' => [
        'defaults' => 'php',
        'timeout'=> 172800, //seconds
    ],

 

CakePHP 3:

In config/app.php we can set the timeout.

'Session' => [
    'defaults' => 'php',        
    'timeout'=>24*60//in minutes
],      

 

CakePHP 2:

in your Config/core.php

Configure::write('Session', array(
    'defaults' => 'php',
    'timeout' => 31556926 //increase time in seconds
));      

 

Share this Post