[英]Session expires very quickly in cakePHP 2.9
我在config.php文件中尝试了许多选项,但没有成功。 这里的选项。 第一:
Configure::write('Session', array(
'defaults' => 'php',
'timeout' => 31556926, // The session will timeout after 30 minutes of inactivity
'cookieTimeout' => 31556926,
'ini' => array(
'session.gc_maxlifetime' => 31556926 // 36 hours
)
));
第二个:
Configure::write('Session', array(
'defaults' => 'php',
'Session.timeout' => 36000
));
请让我知道,因为会话将在工作中终止!
在(app / Config / core.php)中使用以下代码
Configure::write('Session', array(
'defaults' => 'cake',
'timeout' => 30, // The session will timeout after 30 minutes of inactivity
'cookieTimeout' => 1440, // The session cookie will live for at most 24 hours, this does not effect session timeouts
'checkAgent' => false,
'autoRegenerate' => true, // causes the session expiration time to reset on each page load
));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.