简体   繁体   English

PHP 5.6升级后想象出错误抛出

[英]Imagick throwing error after PHP 5.6 upgrade

I just upgraded to PHP 5.6 on my GoDaddy account (PHP 5.6.21), and now I'm encountering an error with Imagick when trying to convert a PDF to images to be rendered on the website. 我刚刚在我的GoDaddy帐户(PHP 5.6.21)上升级到PHP 5.6,现在我在尝试将PDF转换为要在网站上呈现的图像时遇到Imagick的错误。

This is the message I receive: 这是我收到的消息:

PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72"  "-sOutputFile=/tmp/magick-472846ep4mk6vC4cDW%d" "-f/tmp/magick-472846xWEGVMrlFXDu" "-f/tmp/magick-472846grNolFlF8PE2"': -dname= must be followed by a valid token
 @ error/pdf.c/InvokePDFDelegate/263

I found this forum thread while on the phone with GoDaddy's support http://www.imagemagick.org/discourse-server/viewtopic.php?t=26260 我在GoDaddy支持的电话中找到了这个论坛帖子http://www.imagemagick.org/discourse-server/viewtopic.php?t=26260

and I gathered that the problem only occurs if both GD and Imagick are enabled. 我收集说,如果同时启用了GD和Imagick,问题就会出现。 Unfortunately I need both - GD won't do what I need, and it turns out MPDF (which I'm using) requires GD to render images. 不幸的是我需要两者 - GD不会做我需要的东西,而事实证明MPDF(我正在使用)需要GD来渲染图像。

Has anybody encountered this error before? 以前有人遇到过这个错误吗? Is there a way to fix it? 有办法解决吗?

Unfortunately Imagick also can't be updated because GoDaddy is unable to do that for me. 不幸的是,Imagick也无法更新,因为GoDaddy无法为我做到这一点。 #hostingproblems #hostingproblems

The solution is to update imagick to the next patch. 解决方案是将imagick更新到下一个补丁。

Shared hosting did not make this possible and eventually we resorting to migrating from our shared hosting plan to a VPS. 共享托管并没有使这成为可能,最终我们将共享托管计划迁移到VPS。

If anybody has this problem in the future I strongly suggest moving away from shared hosting. 如果将来有人遇到这个问题,我强烈建议远离共享主机。 Shared hosting is not suitable for custom code because of problems like this. 共享主机不适合自定义代码,因为这样的问题。

If for any reason this is not an option I wish you good luck. 如果由于任何原因这不是一个选项,我祝你好运。 Make backups and buy a tub of icecream to ease the impending emotional trauma. 备份并购买一桶冰淇淋,以缓解即将到来的情绪创伤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM