簡體   English   中英

會話在cakePHP 2.9中很快終止

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM