"Gc maxlifetime이 phpMyAdmin 쿠키유효시간보다 짧음"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight ))
11번째 줄: 11번째 줄:
==확인==
==확인==
;명령어
;명령어
<source lang='bash'>
<syntaxhighlight lang='bash'>
cat /etc/php.ini | grep gc_maxlifetime
cat /etc/php.ini | grep gc_maxlifetime
cat /var/www/html/phpMyAdmin/config.inc.php | grep LoginCookieValidity
cat /var/www/html/phpMyAdmin/config.inc.php | grep LoginCookieValidity
17번째 줄: 17번째 줄:


;실행예시
;실행예시
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# cat /etc/php.ini | grep gc_maxlifetime
[root@zetawiki ~]# cat /etc/php.ini | grep gc_maxlifetime
session.gc_maxlifetime = 1440
session.gc_maxlifetime = 1440

2020년 11월 2일 (월) 00:40 판

PHP gc_maxlifetime이 phpMyAdmin 쿠키유효시간보다 짧음

1 문제상황

phpMyAdmin에 로그인하면 하단에 다음과 같은 경고문이 나온다.

Your PHP parameter session.gc maxlifetime is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.

문제상황이라고는 하지만 사용상 문제는 없다. phpMyAdmin 로그인이 설정보다 좀더 빨리 풀릴 뿐이다.

2 확인

명령어

<syntaxhighlight lang='bash'> cat /etc/php.ini | grep gc_maxlifetime cat /var/www/html/phpMyAdmin/config.inc.php | grep LoginCookieValidity </source>

실행예시

<syntaxhighlight lang='console'> [root@zetawiki ~]# cat /etc/php.ini | grep gc_maxlifetime session.gc_maxlifetime = 1440

setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes)

[root@zetawiki ~]# cat /var/www/html/phpMyAdmin/config.inc.php | grep LoginCookieValidity

* @global integer $cfg['LoginCookieValidity']

$cfg['LoginCookieValidity'] = 3600; </source>

→ gc_maxlifetime는 1440초(24분), LoginCookieValidity는 3600초(60분)으로 되어 있다.
→ gc_maxlifetime ≥ LoginCookieValidity 이 되도록 수치를 조정하면 된다.
→ 어느 쪽 변수를 조정해도 상관없으나, gc_maxlifetime를 조정했다면 httpd를 재시작해야 적용된다.[1]

3 같이 보기

4 주석

  1. 수정한 php.ini이 실제 적용되려면 아파치 재시작 필요

5 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}