VCPHP网站模板 - 外贸网站建设,外贸网站模板

VCPHP网站模板

当前位置: 首页 > ZenCart > ZenCart教程 >

ZenCart 后台上传图片出现Cannot Initialize new GD imag

时间:2014-05-27 01:43来源:未知 作者:VCPHP网站模板 点击:
ZenCart后台上传图片出现Cannot Initialize new GD image stream,一看到这个提示就知道与GD库有关,查看了下空间配置已经支持GD库,那该怎么解决呢。 还有一大串提示: Warning: imagecreatetruecolor() [funct

ZenCart 后台上传图片出现Cannot Initialize new GD image stream,一看到这个提示就知道与GD库有关,查看了下空间配置已经支持GD库,那该怎么解决呢。

还有一大串提示:

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in public_html/admin/includes/modules/new_product_preview.php on line 80

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 81

Warning: imagefill(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 82

Warning: imagecopyresized(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 90

Warning: imagejpeg(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 94

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 120

Warning: imagefill(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 121

Warning: imagecopyresized(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 129

Warning: imagecopymerge(): supplied argument is not a valid Image resource in /public_html/admin/includes/modules/product_preview.php on line 135
Cannot Initialize new GD image stream

网上搜索了一翻,终于找到了答案:
原因是:admin/includes/modules/new_product_preview.php 文件中的
$im_s = @imagecreatetruecolor( PRODUCT_MEDIUM_SMALL_WIDTH, PRODUCT_MEDIUM_SMALL_HEIGHT ) or die(“Cannot Initialize new GD image stream”);这行代码中的 PRODUCT_MEDIUM_SMALL_WIDTH, PRODUCT_MEDIUM_SMALL_HEIGHT的值没有读取到,是非法值。
解决方案:删除此代码中的or die(“Cannot Initialize new GD image stream”);
重新打开后台看了下,终于可以了!

(责任编辑:VCPHP网站模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
验证码: 点击我更换图片
栏目列表
推荐内容
 
QQ在线咨询
售前电话热线
400-083-8184
售前QQ客服