【问题标题】:Laravel PDF-to-image: ImagickException: not authorizedLaravel PDF 到图像:ImagickException:未授权
【发布时间】:2018-10-11 19:43:03
【问题描述】:

如果我在我的工具中上传图片并单击下一步,则会出现以下错误:

ImagickException: not authorized `/tmp/comcard_NEgyzR.pdf' @ error/constitute.c/ReadImage/412
/vendor/spatie/pdf-to-image/src/Pdf.php in line 169

任何想法。这从一个时刻发生到另一个时刻。

【问题讨论】:

标签: laravel


【解决方案1】:

我在 PHP 更新后遇到了同样的问题,而不是升级。能够在 spatie git-hub 页面的帮助下通过以下说明解决它。


似乎这个错误上周开始发生在很多人身上。没有真正的原因。部分修复...

第 1 步: 须藤纳米 /etc/ImageMagick-6/policy.xml

第二步: 添加/编辑以下行

<policy domain="coder" rights="read|write" pattern="PDF" /> <policy domain="coder" rights="read|write" pattern="LABEL" />

如果您有 MGV 行,您可能还需要注释掉它。我没有。

第三步: 重新启动 Web 服务器和 php-fpm。即(在 nginx/php7.2 上) sudo 服务 nginx 重启 sudo systemctl restart php7.2-fpm

如果上述 3 个步骤不适合您,请点击以下链接了解更多详情。 https://github.com/spatie/laravel-medialibrary/issues/1268#issuecomment-429928562

【讨论】:

    【解决方案2】:

    我已经面临这个问题解决方案更改文件路径正确更改基本路径到文件的 FCPATH 保存位置

    [PHP ImagickException: 未授权][1]

    完整解决方案链接 [1]:PHP ImagickException: not authorized

    【讨论】:

      猜你喜欢
      • 2016-10-02
      • 2019-03-19
      • 2019-03-22
      • 1970-01-01
      • 1970-01-01
      • 2020-11-15
      • 2017-06-12
      • 1970-01-01
      • 2019-03-07
      相关资源
      最近更新 更多