2017-04-24 19 views
1

CakePHP 2의 세션 만료 시간을 늘리는 방법을 알려주십시오.cakephp 2의 로그인 시간을 늘리는 방법

현재 구성을 다음과 같이 설정합니다.

Configure::write('Session', array(
     'defaults' => 'php', 
       'timeout' => 129600, // The session will timeout after 30 minutes of inactivity 
       'cookieTimeout' => 129600, // The session cookie will live for at most 24 hours, this does not effect session timeouts 
       'ini' => array(
        'session.gc_maxlifetime' => 129600 // 36 hours 
       ) 
    )); 

그러나, 이러한 설정이 작동하지 세션 내 문제 "How to increase cakephp Auth component session expire time"

+1

가능한 복제 [CakePHP의 인증 구성 요소 세션을 증가하는 방법 t 만료 귀하의 요구 사항에 따라 시간을 추가 ime] (http://stackoverflow.com/questions/30694932/how-to-increase-cakephp-auth-component-session-expire-time) – drmonkeyninja

+0

위의 질문에서 솔루션 언급을 시도했다. 그것은 나를 위해 작동하지 않았다. –

답변

0

응용 프로그램

의 core.php 파일에이 구성을 추가하기가 해결되지 않는 거의 24 minutes.Thanks 이 스레드 만료
Configure::write('Session', array(
'defaults' => 'cache',//default session 
'timeout' => '<time_in_minute>',//in minutes 
'cookieTimeout' => '<time_in_minute>',//in minutes 
'ini' => array('session.cookie_domain' => env('HTTP_BASE')), 
'handler' => array(
    'config' => '<handler>' //if you are using default sessions then this field is not necessary 
) 
)); 

+1

이 코드는 작동하지 않아 로그인 할 수 없습니다. –