【问题标题】:Plesk website - PHP open_basedir restriction in effect. File is not within the allowed pathPlesk 网站 - PHP open_basedir 限制生效。文件不在允许的路径内
【发布时间】:2021-11-23 23:51:58
【问题描述】:

我正在尝试运行此代码:

$img = new Imagick('ttt.jpg');
$quality = $img->getImageCompressionQuality();
echo $quality;

我有两个网站都有这个代码,它们在 plesk 上运行。

此代码在其中一个网站上运行良好,但在我得到的另一个网站上:

open_basedir restriction in effect. File is not within the allowed path

我已将 777 权限授予该文件夹和包含文件。

两个网站都使用 PHP 7.3,因此使用相同的 php.ini 文件

我正在使用 Plesk 和 Windows Server 2016

我错过了什么?

【问题讨论】:

    标签: php plesk imagick open-basedir


    【解决方案1】:

    好的,我知道了,它在每个网站的 PHP 设置中,有一个名为 open_basedir 的选项在 imagick 代码工作的网站上设置为 none

    【讨论】:

      猜你喜欢
      • 2010-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-07
      相关资源
      最近更新 更多