Web/PHP
[PHP 에러 해결하기] PHP message: PHP Warning: phpinfo() It is not safe to rely on the system's timezone settings
Hannah_ko
2020. 10. 13. 14:11
SMALL
PHP 설치하기
2020/09/29 - [Web/Nginx] - Nginx에 php-fpm 설치하기 for Centos7
PHP를 설치하고 phpinfo 파일로 테스트 할 때 로그에
FastCGI sent in stderr: "PHP message: PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
이런 경고가 뜬다면 타임존 설정이 안 되어있다는 것이다.
그럴 때는 리눅스 centos 7 기준 /etc/php.ini 파일의 타임존을 설정해주면 된다.
$ vi /etc/php.ini
...
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Seoul
LIST