경고 메시지 대처법 - Strict warning: strtotime(): It is not safe to rely on the system's timezone settings.
경고 메시지 대처법 - Strict warning: strtotime(): It is not safe to rely on the system's timezone settings.
・현상 : 호스팅 서버의 PHP 버전을 업그레이드한 후, 에러는 아니지만 드루팔 관리자 화면에 아래와 같은 경고가 잔뜩 나타났다.
Strict warning: strtotime(): It is not safe to rely on the system's timezone settings.
Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. e selected '...지역그룹/지역...' for '...타임존 설정...' instead in ... 함수명 ... 모듈명.
・원인 : php.ini의 타임존 설정이 잘못되거나 공백인 탓이다.
・해결 : php.ini를 백업한 후 아래와 같이 수정해야 한다.
(호스팅 회사에 의뢰할 수도 있지만, 요즘 호스팅은 VPS인 경우가 많아서 독자적으로 수정 가능. 루트 권한 필요.)
기존의 문제 부분.
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
; date.timezone =
수정 후.
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = Asia/Seoul
지역에 따라 Asia/Tokyo, America/Chicago, Europe/Andorra 등의 별도 설정이 가능하다.
* 위와 같이 수정후 아파치 서버의 재기동이 필요하다.
CentOS의 경우, /sbin/service httpd restart 명령으로 재기동 가능하고,
php.ini는 /etc에 존재한다.
・재발방지 : 특별히 필요없다. 버전업시 경고가 나오면 위와 같이 조치하면 된다.
이 글과 관련이 있나요...
- 특정 날짜 전후로 Views에 Date 필터 조건 걸기
- glossify모듈을 설치/활성화한 후의 warning: preg_replace() [function.preg-replace]: Compilation failed: support for \P, \p, and \X 경고 메시지 대처법.
- 드루팔사이트에서 파일 버젼,date,size,link,status보여주고 파일 다운로드하게 하려면 어떻게 하면 되나요?
- Node Import 모듈을 이용한 컨텐츠의 대량 입수 (csv, tsv 등으로 배치 입력)
- 드루팔에 매우 긴 본문(BODY)을 입력하면 보이지 않는다?!


최근 댓글 목록
1 일 12 시간 전
7 주 1 일 전
7 주 1 일 전
7 주 1 일 전
7 주 1 일 전
9 주 4 일 전
9 주 4 일 전
11 주 19 시간 전
11 주 1 일 전
11 주 1 일 전