Xampp-PHP Imagick不适用于本地的Ghostscript

我在Windows 10的XAMPP中成功在PHP 7.2.18上安装了Imagick版本3.4.4。 我尝试启动phpinfo.php文件,并且看到正确配置的imagick。

我的网站使用的是Magento 1.9.4.3。 我在客户帐户页面上,我只是尝试运行此代码以查看imagick是否存在并且一切正常:

if (class_exists('imagick')) {echo "imagick exist";} else {echo "class imagick not exist";}

此后,我为win 32安装了ghostscript 9.50。我在xampp的主根目录中安装了ghostscript。在安装Ghostscript之后,我也立即尝试以这种方式读取pdf文件,不幸的是页面返回空白:

$Filename = Mage::getBaseDir().DS.'clienti'.DS.$customerName.DS."flooop.pdf";

$im = new imagick();
$im->readImage($Filename);

我从var / log / exception.log文件中看到的错误是:

ImagickException: PDFDelegateFailed `system cannot find the file specified.

' @ error/pdf.c/ReadPDFImage/794 in C:\xampp\htdocs\higiftit\app\design\frontend\sns_toronto\default\template\customer\upload\area-invio-file.phtml:186

我尝试了所有方法,但不幸的是,总是会返回相同的错误。 我该怎么办?

hyc8015 回答:Xampp-PHP Imagick不适用于本地的Ghostscript

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2809812.html

大家都在问