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()
将 $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()
相关文章推荐
- [转]php Imagick写文字图片并自动换行
- Laravel框架数据库CURD操作、连贯操作总结
- WEB_PHP_PHP文件上传下载
- PHP预定义超全局数组 $_GET 原理分析
- ThinkPHP的配置
- PHP中MVC框架的实现
- PHP中SQL注入解析
- PHP防止SQL注入详解及防范
- YII框架的类自动加载机制
- PHP防止SQL注入的方法(2)
- PHP防止SQL注入的方法(1)
- PHP防止SQL注入自带函数分析
- PHP判断是否为手机客户端
- Scalaz(5)- typeclass:my typeclass scalaz style-demo
- Scalaz(5)- typeclass:my typeclass scalaz style-demo
- php多维数组的去重(针对任意的键值进行去重)--二维数组的唯一--时间复杂度~O(n)
- Thinkphp学习笔记
- thinkphp 数据库设置前缀问题 联合查询
- php 出现 500 Internal Server Error错误问题解决
- PHP 基础