欢迎光临
我们一直在努力

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

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

未经允许不得转载:外贸商城系统,外贸网站模板,php建站教程,zencart模板 » ZenCart 后台上传图片出现Cannot Initialize new GD image stream

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

35PHP 更全 更专业 更方便