[英]Session timeout not working in Cakephp 2
I need to define a very large session time on a cakephp 2 application due to a business need. 由于业务需要,我需要在cakephp 2应用程序上定义非常大的会话时间。 I defined it on the core.php file as follows:
我在core.php文件中定义了它,如下所示:
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 core.php中
Configure::write('Session', array(
'defaults' => 'php',
'timeout' => 259200,
'ini' => array(
'session.gc_maxlifetime' => 259200 // 3 day
)
));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.