ecshop常见错误的处理方法
1、安装第二步提示:
1 | gd_version() # 相关的错误 |
解决方法:
把ecshp安装目录下的 /upload/install/includes/lib_installer.php中第31行:
1 | return cls_image::gd_version(); |
改为:
1 | $p = new cls_image(); |
2、首页出现错误:
1 | Only variables should be passed by reference in F:\wamp\www\ECShop\upload\includes\cls_template.php on line 422 |
解决方法:
按提示的路径找到/upload/includes/cls_tmplate.php中的第422行:
1 | $tag_sel = array_shift(explode(' ', $tag)); |
改为:
1 | $tag_arr = explode(' ', $tag); |
然后删掉ecshp安装目录下的/tmp/cache下的所有缓存文件.
3、后台首页出现:
1 | Non-static method cls_image::gd_version() should not be called statically in F:\wamp\www\ECShop\upload\includes\lib_base.php on line 346 |
解决方法:
找到ecshop安装目录下的 /upload/includes/cls_image.php 中第678行:
1 | function gd_version(); |
改为:
1 | static function gd_version(); |
4、安装后首页出现:
1 | Strict standards: Only variables should be passed by reference in F:\wamp\www\ECShop\upload\includes\lib_main.php on line 1329 |
解决方法:
找到ecshop安装目录下的 /upload/includes/lib_main.php 中第1329行:
1 | $ext = end(explode('.', $tmp)); |
改为:
1 | $ext = explode('.', $tmp); |
5、后台出现:
1 | mktime() # 相关错误 |
解决方法:
找到提示的行,把mktime()改为time().
6、后台出现:
1 | Redefining already defined constructor for class alipay in F:\wamp\www\ECShop\uploades\modules\payment\alipay.php on line 85 |
解决方法:
找到提示的行,在alipay这个类中加入:
1 | function tenpayc2c() |
再把alipay这个类中:
1 | functions __construct() |
改为:
1 | functions __construct() |
7、后台支付方式管理页面出现:
1 | Strict standards: Redefining already defined constructor for class post |
提示,意思是重新定义了函数,这是因为类中与类同名的函数和构造函数冲突的问题造成的.
解决方法:
找到提示的文件,在那个类中,那与类名同名的函数注释掉就可以了.
8、后台站点地图页面出现:
1 | Deprecated: Assigning the return value of new by reference is deprecated |
解决方法:
找到相应的行,去掉等号后面的&即可.
9、后台会员整合中出现:
1 | Strict standards: Declaration of ucenter::set_cookie() should be compatible withintegrate::set_cookie |
意思是这个文件中的函数的参数和integrate.php中的相同函数的参数个数不一样,一般是少了一个$remember参数.
解决方法:
找到出错的文件中出错的函数,然后打开相同目录下的integrate.php文件,找到相应的函数,把缺少的参数直接复制过来.
10、数据库备份页面出现:
1 | Strict standards: Non-static method cls_sql_dump::get_random_name() should not becalled statically in F:\wamp\www\ECShop\upload\admin\database.php on line 64 |
解决方法:
打开 /ecshop/upload/admin/includes/cls_sql_dump.php:
1 | function get_random_name() |
改为:
1 | static function get_random_name() |