服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > zencart教程 >

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

时间:2016-03-11 14:58来源: 作者: 点击:
ZenCart后台上传图片出现Cannot Initialize new GD image stream,一看到这个提示就知道与GD库有关,查看了下空间配置已经支持GD库,那该怎么解决呢。 还有一大串提示: Warning: imagecreatetruecolor

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”);
重新打开后台看了下,终于可以了!

(责任编辑:最模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容