我正在尝试在 Drupal 中使用 ImageMagick 工具包,但不断收到此错误:
warning: file_exists(): open_basedir restriction in effect.
File(/usr/bin/convert) is not within the allowed path(s):
(/var/www/vhosts/dev.mysite.com/dev2.mysite.com/drupal/:/tmp/) in
/var/www/vhosts/dev.mysite.com/dev2.mysite.com/drupal-6.22/includes/image.imagemagick.inc
on line 55.
No file /usr/bin/convert could be found. PHP's open_basedir security restriction
is set to /var/www/vhosts/dev.mysite.com/dev2.mysite.com/drupal/:/tmp/, which
may be interfering with the attempts to locate ImageMagick.
我已经阅读了 Drupal 论坛和“周围”的许多帖子,并尝试了各种建议的解决方案(将我在 Drupal 中的目录设置为 /sites/default/files/tmp 等),但到目前为止,没有任何效果。在这一点上,因为我确实可以访问 php.ini,所以我想我可以编辑它,但我想知道编辑它是否是正确的方法?我担心将 /usr/bin/convert 添加到 php.ini 中的允许路径是否是一个安全问题,或者是否有其他方法可以让它工作?