ecshop各种报错汇总

为了研究ecshop源码,安装了一些ecshop,结果报了一堆错误。写一个文档已备以后使用

1.安装的时候不支持jpeg,解决办法如下:

install/includes/lib_installer.php其中98行左右,将 

$jpeg_enabled = ($gd_info['JPG Support']        === true) ? $_LANG['support'] :$_LANG['not_support'];

修改为 

$jpeg_enabled = ($gd_info['JPEG Support']        === true) ? $_LANG['support'] :$_LANG['not_support'];

2.安装后报Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in   \includes\cls_template.php on line 300错误。

return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);

修改为:

return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source);

同理,第550行左右:

$val = preg_replace("/\[([^\[\]]*)\]/eis", "'.'.str_replace('$','\$','\\1')", $val);

修改为:

$val = preg_replace_callback(

'/\[([^\[\]]*)\]/is',

function ($matches) {

return '.'.str_replace('$','\$',$matches[1]);

},

$val

);

同理,第491行左右:

$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t,true)).";\n";

修改为:

$out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,]+)/" , 

function($match){return stripslashes(trim($match[1],'\''));}

, var_export($t, true)) . ";\n";

同理,第1080行左右,

$source      = preg_replace($pattern, $replacement, $source);

修改为:

$source      = preg_replace_callback($pattern, $replacement,$source);


3.进入后台报错:

Strict Standards: Only variables should be passed by reference in E:\Tools\ECShop_V2.7.3_UTF8_release1106\upload\includes\cls_template.php
on line 418
将:
$tag_sel = array_shift(explode(' ', $tag));
修改为:
$tag_arr = explode(' ', $tag);  $tag_sel = array_shift($tag_arr);
4.后台报Deprecated: Assigning the return value of new by reference is deprecated in F:\wnmp\wamp\www\ecshop\upload\admin\goods_batch.php on line 921错误
将921行$filter = &new stdclass;修改为:
$filter = new stdclass;
5.后台会员整合报
Strict standards: Declaration of phpwind6::set_cookie() should be compatible with integrate::set_cookie($username = '', $remember = NULL) in F:\wnmp\wamp\www\ecshop\upload\includes\modules\integrates\phpwind6.php on line 353等一些列错误,
将对应文件里面的set_cookie($username='')函数参数改为:
set_cookie($username = '', $remember = NULL)
Strict standards: Declaration of ucenter::login() should be compatible with integrate::login($username, $password, $remember = NULL) in F:\wnmp\wamp\www\ecshop\upload\includes\modules\integrates\ucenter.php on line 630这种错误处理同上,将对应函数参数修改即可

基本就这些了,以后遇到了再添加进去。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值