PHP ImagickException:未经授权 [英] PHP ImagickException: not authorized

查看:323
本文介绍了PHP ImagickException:未经授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法解决这个问题吗?

Any ideas how to fix this ?

 ImagickException: not authorized `/tmp/magick-1552lvf2nIjaqx1W' @ error/constitute.c/ReadImage/412 

我认为这是一个权限问题,因此仅出于测试目的,我将/tmp目录设置为777.没有更改.这让我疯狂.

I thought it was a permission issue so just to test it out i set my /tmp dir to 777. No change. Its driving me crazy.

命令:

<?php


$image = new \Imagick();
$image->readImageBlob('<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $graph);

推荐答案

您的政策"MVG"可能是原因.只是评论

Your policy "MVG" could be the reason. Just comment

<policy domain="coder" rights="none" pattern="MVG" />

/etc/ImageMagick/policy.xml中,然后重新启动Apache服务器.

in /etc/ImageMagick/policy.xml and restart Apache server.

这篇关于PHP ImagickException:未经授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆