您的位置:首页 > 编程语言 > PHP开发

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

2015-09-19 21:07 597 查看
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()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: