安装出错。

2016-07-07 15:18 来源:www.chinab4c.com 作者:ecshop专家



win系统安装问题。
到第三步。页面顶上会出现以下错误。

  1. Warning: date_default_timezone_get() [function.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 'UTC' for '8.0/no DST' instead in D:\NPMserv\www\ecshop\install\includes\lib_installer.php on line 223
复制代码


输入好数据库信息。点立即安装后监视器出现以下错误

创建配置文件............成功
创建数据库............成功
安装数据............失败


Warning: date_default_timezone_get() [function.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 'UTC' for '8.0/no DST' instead in D:\NPMserv\www\ecshop\includes\cls_mysql.php on line 163

Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in D:\NPMserv\www\ecshop\includes\cls_mysql.php on line 165

Warning: date_default_timezone_get() [function.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 'UTC' for '8.0/no DST' instead in D:\NPMserv\www\ecshop\includes\cls_mysql.php on line 173
OK

回答:
你可以看下
http://bbs.ecshop.com/viewthread ... mp;extra=#pid396795
47

这是因为php5.1.0开始,php.ini里加入了date.timezone这个选项,默认情况下是关闭的。

修改php.ini文件,查找 ;date.timezone = ,把前面的分号去掉在 “=”后面加上时区。

比如:Asia/Chongqing (重庆),Asia/Shanghai (上海),Asia/Urumqi (乌鲁木齐),Asia/Macao (澳门),Asia/Hong_Kong (香港),Asia/Taipei (台北),PRC


;date.timezone =
改成:
date.timezone = Asia/Shanghai

重启apach后就okay了。