ecshop在PHP 5.4以上版本各种错误问题处理

1、PHP 5.4.X环境下安装ECShop出现“includes/cls_template.php on line 406”的解决方案。

将 $tag_sel = array_shift(explode(‘ ‘, $tag)); 这句话拆开为两句。

$tag_arr = explode(‘ ‘, $tag);

$tag_sel = array_shift($tag_arr);

array_shift() 的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值 end(&array) 也一样(后面也会有end的函数,也需要拆分为两行)。

2、PHP 5.4.X环境下安装ECShop出现“includes/lib_base.php on line 346”的解决方案。

将 cls_image.php 中 function gd_version() 改成 static function gd_version() 即可。

3、后台点击 开店向导 警告的解决方案。

admin/include/modules/payment 下的几个文件构造函数错误,删掉即可。

4、php5.4下安装的时候处理问题,Strict Standards: Non-static method cls_image::gd_version() should not be called statically in \install\includes\lib_installer.php on line 31

解决:找到install/includes/lib_installer.php中的第31行   return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:

将function gd_version()改成static function gd_version()即可。

5、安装好后出现 Strict standards: Only variables should be passed by reference in \includes\lib_main.php on line 1329

$ext = end(explode(‘.’, $tmp));

修改为:

$ext = explode(‘.’,$tmp);
$ext = end($ext);

6、Strict standards: Only variables should be passed by reference in \includes\cls_template.php on line 418

tag_sel = array_shift(explode(‘ ‘, $tag));

修改为:

$tag_arr = explode(‘ ‘, $tag); $tag_sel = array_shift($tag_arr);

7、ECSHOP后台“商店设置”报错 Strict Standards: mktime(): You should be using the time() function instead in /www/web/zhuli/public_html/admin/sms_url.php on line 31。

php版本问题  mktime()修改为  time()

8、 ECSHOP后台“商店设置”报错 Strict Standards: mktime(): You should be using the time() function instead in /www/web/zhuli/public_html/admin/shop_config.php on line 32。

php版本问题  mktime()修改为  time()

原创文章,作者:wwh,如若转载,请注明出处:https://www.wuwenhui.cn/3268.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
wwhwwh
上一篇 2014-06-17
下一篇 2014-06-21

相关推荐

  • 如何寻找合适的友情链接

    不管是新站还是老站,一直都离不开友情链接的建设。友情链接并不一定能给你带来多少直接流量,但它能够把页面的权重传递给链接的网站页面,同时能吸引搜索引擎抓取链接网站的数据,让搜索引擎更…

    2013-03-26
    8.5K6
  • wordpress注册时邮件即发送密码也显示

    在用wordpress注册用户时,一般都是用邮件发送密码到邮箱。但在很多情况下,例如某些服务器不支持mail函数。还有某些邮箱之间的存在的问题,网络问题等,导致无法发送邮件。 这里…

    2012-12-25
    11.5K9

发表回复

登录后才能评论

联系我们

在线咨询:点击这里给我发消息

站长邮箱:admin@wuwenhui.cn
工作时间:周一至周五,8:30-17:30,节假日休息

微信
本站支持QQ一键注册登录,所有资源下载均在文章底部~