SYSTEM WARNING: 'date_default_timezone_get(): 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. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead' in '/var/www/html/mantis/core.php' line 274
:
很明显是由于PHP默认的时间区域设置问题导致的警告,本来也没什么,不过这个警告最后还是给我带来了麻烦,主要是数据库那段过不去,不得已,只有自己动手修改了,这里有两种办法供大家参考:
1. 修改'/var/www/html/mantis/core.php'文件。在这个文件顶部<?php之内加上如下PHP代码:
这是个临时的解决办法,可以帮你成功安装数据库,长久之计还是要看方法2。
2. 修改PHP配置文件php.ini。如果你服务器的主要时区是亚洲上海,那么修改这里是比较妥当的,当然更稳妥的办法是通过.htaccess导入PHP设置。
打开 php.ini 将 date.timezone =去掉前面的注释;号,然后改成date.timezone =Asia/Shanghai,保存配置文件,重启你的服务器。
好的,这个问题也就这样很好的解决了。
注:
①php.ini路径?
创建一个php测试文件,内容为:<?php phpinfo();?>。运行,找到Loaded Configuration File即可。