Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
来源:互联网 发布:linux ftp命令上传文件 编辑:程序博客网 时间:2024/05/17 06:34
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/Hong_Kong' for 'HKT/8.0/no DST' instead in D: ootpms.ccshopuploadinstallincludeslib_installer.php on line 223
很明显是由于PHP默认的时间区域设置问题导致的警告,本来也没什么,不过这个警告最后还是给我带来了麻烦,主要是数据库那段过不去,不得已,只有自己动手修改了,这里有两种办法供大家参考:
1. 修改installincludeslib_installer.php文件。在这个文件顶部<?php之内加上如下PHP代码:
这是个临时的解决办法,可以帮你成功安装数据库,长久之计还是要看方法2。
2. 修改PHP配置文件。如果你服务器的主要时区是亚洲上海,那么修改这里是比较妥当的,当然更稳妥的办法是通过.htaccess导入PHP设置。
打开PHP.INI大概在1019 【具体的行数,根据配置版本不一样】找到; date.timezone =去掉前面的注释;号,然后改成date.timezone =Asia/Shanghai,保存配置文件,重启你的服务器。
好的,这个问题也就这样很好的解决了。
该文章转载自http://www.pms.cc/operations/201307/date_default_timezone_get.html
- Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- 【php】PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- Warning: date(): It is not safe to rely on the system's timezone settings
- Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.
- yii产生warning date(): It is not safe to rely on the system's timezone settings
- PHP Warning: date(): It is not safe to rely on the system's timezone settings
- Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings.
- PHP Warning: phpinfo(): It is not safe to rely on the system\'s timezone settings
- 【php】PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings.
- PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings
- php Warning:date(): It is not safe to rely on the system's timezone settings
- Warning: date(): It is not safe to rely on the system's timezone settings
- 解决方案:Warning: phpinfo(): It is not safe to rely on the system's timezone settings.
- 分数矩阵 2156
- 使用JavaMail收取邮件并解析
- Ant学习 之 [致命错误]
- 我的编程之路(四) 第一次外快
- 有关em的个人理解
- Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
- cocos2d-x 3.0 正式版新特性简介
- Sockit 开发记录
- winform Combobox出现System.Data.DataRowView的解决办法
- android 批量插入数据
- 我的编程之路(五) 跳槽的心
- hadoop之搭建环境
- HLG1349 Graph 给出最短路求出原图最少边数
- 我的编程之路(六) 投资自己——读书