I need to define a very large session time on a cakephp 2 application due to a business need. I defined it on the core.php file as follows:
Configure::write('Session', array(
'defaults' => 'php', //defaults => php
'cookie' => 'cookie',
'timeout' => 4320 // 3 days
));
I made a test and arround two hours of inactivity my session is closed, every time I click a button I get back to the logon screen, how can I effectively control my session time?
Use this It may work.it is working for me
core.php
Configure::write('Session', array(
'defaults' => 'php',
'timeout' => 259200,
'ini' => array(
'session.gc_maxlifetime' => 259200 // 3 day
)
));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.