ecshop安装到php5.2版本以上出错,解决方法
2016-04-13 16:39
1041 查看
http://www.ecshoptemplate.com/article-1846.html
http://www.ecshoptemplate.com/article-1622.html http://www.ecshoptemplate.com/article-1938.html
打开 install/includes/lib_installer.php 文件,定位到第31行左右,将
return cls_image::gd_version();
改为
$cls_zuimoban_image = new cls_image();
return $cls_zuimoban_image->gd_version();
地址:http://www.ecshoptemplate.com/article-1846.html
安装ecshop2.7.3,gd2库已经开启,png等图片格式也都支持,但是显示不支持jpeg,查看检测的源文件 install/includes/lib_installer.php.其中98行左右是对图片格式的验证。
可用看到是对$gd_info值检验来看是否支持某个图片类型的,打印这个数组,可用看到其是支持JPEG的,$gd_info['JPEG Support']是存在的,$gd_info['JPG Support']不存在。所以将$gd_info['JPG Support'] 修改为$gd_info['JPEG Support']即可。
[/code]
ecshop安装完毕出现如下报错:
Strict Standards: Only variables should be passed by reference in I:\Project\zuimoban\includes\cls_template.php on line 406
代码出在cls_template.php on line 406文件
这是ecshop不兼容PHP 5.3 以上版本,应该也和配置有关
只要406行把这一句拆成两句就没有问题了
$tag_sel = array_shift(explode(' ', $tag));
改成:
$tag_arr = explode(' ', $tag);
$tag_sel = array_shift($tag_arr);
因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值
或则如果这样配置的话:
error_reporting = E_ALL | E_STRICT
http://www.ecshoptemplate.com/article-1622.html
http://www.ecshoptemplate.com/article-1622.html http://www.ecshoptemplate.com/article-1938.html
如何解决:XMlHttpRequest status:[500] Unknow status
\upload\admin\cloud.php,里面有一个mktime(),改为time()PHP Strict Standards: Non-static method cls_image::gd_version() should not be called statically in ecshop\install\includes\lib_installer.php on line 31
打开 install/includes/lib_installer.php 文件,定位到第31行左右,将
return cls_image::gd_version();
改为
$cls_zuimoban_image = new cls_image();
return $cls_zuimoban_image->gd_version();
地址:http://www.ecshoptemplate.com/article-1846.html
安装ecshop2.7.3,gd2库已经开启,png等图片格式也都支持,但是显示不支持jpeg,查看检测的源文件 install/includes/lib_installer.php.其中98行左右是对图片格式的验证。
1 | $gd_info = gd_info(); |
2 | $jpeg_enabled = ($gd_info['JPG Support'] === true) ? $_LANG['support'] :$_LANG['not_support']; |
3 | $gif_enabled = ($gd_info['GIF Create Support'] === true) ? $_LANG['support'] :$_LANG['not_support']; |
4 | $png_enabled = ($gd_info['PNG Support'] === true) ? $_LANG['support'] :$_LANG['not_support']; |
PHP Strict Standards: Only variables should be passed by reference in \web\ecshop\includes\lib_main.php on line 1329 [code]PHP Strict Standards: Only variables should be passed by reference in web\ecshop\includes\cls_template.php on line 422
[/code]
ecshop安装完毕出现如下报错:
Strict Standards: Only variables should be passed by reference in I:\Project\zuimoban\includes\cls_template.php on line 406
代码出在cls_template.php on line 406文件
这是ecshop不兼容PHP 5.3 以上版本,应该也和配置有关
只要406行把这一句拆成两句就没有问题了
$tag_sel = array_shift(explode(' ', $tag));
改成:
$tag_arr = explode(' ', $tag);
$tag_sel = array_shift($tag_arr);
因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值
或则如果这样配置的话:
error_reporting = E_ALL | E_STRICT
http://www.ecshoptemplate.com/article-1622.html
相关文章推荐
- php.ini文件中的include_path设置和$_SERVER['DOCUMENT_ROOT']
- php获取某一年的工作日列表
- php数据库操作
- 解决PHP中文乱码
- 比较php字符串连接的效率
- 实习日志-php-分别用print_r,var_dump,var_export打印数组
- phpStorm php环境变量的配置
- php之static和&关键字解析
- php异常处理
- java模拟PHP的pack和unpack类
- phpstorm invalid descendent file name
- php远程下载类分享
- PHP-迭代器与序列化
- phpword的几个坑
- PHP 实现商品的无限规格实现思路
- ThinkPHP之OAuth2.0环境搭建
- Thinkphp和onethink实现微信支付插件
- php中JSON的使用与转换
- thinkphp3.2加载模块错误
- php自定义分页