安装ecshopV2.7.0 Release 0714 出现错误

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



创建配置文件............成功
创建数据库............成功
安装数据............成功
创建管理员帐号............失败


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 thedate_default_timezone_set() function. In case you used any of thosemethods and you are still getting this warning, you most likelymisspelled the timezone identifier. We selected 'Asia/Chongqing' for'CST/8.0/no DST' instead in /var/www/ecshop/includes/lib_time.php on line 28
OK

好像是不支持date()函数

在顶部会有
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 thedate_default_timezone_set() function. In case you used any of thosemethods and you are still getting this warning, you most likelymisspelled the timezone identifier. We selected 'Asia/Chongqing' for'CST/8.0/no DST' instead in /var/www/ecshop/install/includes/lib_installer.php on line 223

回答:
同样的情况!不过修改函数安装成功,但模版那里出现问题
(Deprecated: Function eregi() is deprecated in /var/www/shop/admin/template.php on line 843),
后来删除重装结果怎么都装不上了!

在install/includes/init.php文件里加入一句
date_default_timezone_set ('Asia/Shanghai');
试试行不行。

例如加在这个位置
  1. <?php
  2. date_default_timezone_set ('Asia/Shanghai');
  3. /* 报告所有错误 */
  4. @ini_set('display_errors', 1);
  5. error_reporting(E_ALL ^ E_NOTICE);
复制代码

确实解决了问题。但我想这个问题是php版本不兼容的原因。不知道程序中,其他遇到时间的地方会遇到相同问题吗