查看php.ini位置:php --ini
yao@192 ~/Sites $ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /private/etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
检查:php -i | grep 'Configuration File'
如果报错了,那么sudo vim /private/etc/php.ini
查询timezone:命令行输入?timezone
然后修改为系统要求的timezone;
重启apache:sudo apachectl restart