安装ecshop提示“安装数据失败”或者“创建管理员帐号”
解决方法:
在install/includes/init.php文件的顶部,<?php 下增加:
date_default_timezone_set ('Asia/Shanghai');
即可
分析原因:php时区导致
另外解决方法,可在php.ini里找到:date.timezone行,改为:
date.timezone=Asia/Shanghai
重启apache。
在安装ECSHOP时,进行到配置页,填写数据库及管理员等信息后点击下一步,提示如下:
创建配置文件............成功
创建数据库............成功
安装数据............成功
创建管理员账号............失败Warning: 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:\wwwroot\hobou\includes\lib_time.php on line 28 OK
网上提示方法将install/includes/lib_installer.php以下内容修改后仍然提示失败:
include(ROOT_PATH . 'install/languages/' . $system_lang . '.php');
修改为
include(ROOT_PATH . 'install/languages/zh_cn.php');
解决办法:
在php.ini中将date.timezone前面的分号去掉,修改为date.timezone = PRC,保存重启WEB。