ecshop安装到php5.2版本以上出错,解决方法

来源:互联网 发布:热门ps软件 编辑:程序博客网 时间:2024/05/16 10:34

http://www.ecshoptemplate.com/article-1846.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'];

可用看到是对$gd_info值检验来看是否支持某个图片类型的,打印这个数组,可用看到其是支持JPEG的,$gd_info['JPEG Support']是存在的,$gd_info['JPG Support']不存在。所以将$gd_info['JPG Support'] 修改为$gd_info['JPEG Support']即可。


PHP Strict Standards:  Only variables should be passed by reference in \web\ecshop\includes\lib_main.php on line 1329
PHP Strict Standards:  Only variables should be passed by reference in web\ecshop\includes\cls_template.php on line 422

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



0 0
原创粉丝点击