PHP open_basedir限制有效,但文件实际上在允许的路径内

时间:2017-05-27 08:22:08

标签: php plesk include-path open-basedir

我查看了关于 openbase_dir 的问题(和答案),其中必需或包含的文件超出了允许的路径。在编辑这个问题时,我已经查看了所有建议的类似问题,但我没有找到像我这样的案例。

我在 CentOS VPS上使用 Plesk 12.5

我有maindomain.com subdomain.maindomain.com以及otherdomain1.comotherdomain2.comotherdomain3.com等等。

我需要访问位于所有/var/www/vhosts/maindomain.com/subdomain.maindomain.com的{​​{1}}中的一些文件。

在我的情况下,我已经包含在open_basedir

otherdomains.com

include_path

.:/opt/plesk/php/7.0/share/pear:/var/www/vhosts/maindomain.com/subdomain.maindomain.com

我需要查看的确切路径,但我仍然收到错误:

{WEBSPACEROOT}{/}{:}{TMP}{/}:/var/www/vhosts/maindomain.com/subdomain.maindomain.com/

汇总...

我无法从Warning: require_once(): open_basedir restriction in effect. File(/var/www/vhosts/maindomain.com/subdomain.maindomain.com/filename.php) is not within the allowed path(s): (/var/www/vhosts/otherdomain.com/:/tmp/:/var/www/vhosts/maindomain.com/subdomain.maindomain.com) in /var/www/vhosts/otherdomain.com/httpdocs/index.php on line XXX Warning: require_once(/var/www/vhosts/maindomain.com/subdomain.maindomain.com/filename.php): failed to open stream: Operation not permitted in /var/www/vhosts/otherdomain.com/httpdocs/index.php on line XXX Fatal error: require_once(): Failed opening required '/var/www/vhosts/maindomain.com/subdomain.maindomain.com/filename.php' (include_path='.:/opt/plesk/php/7.0/share/pear:/var/www/vhosts/maindomain.com/subdomain.maindomain.com') in /var/www/vhosts/otherdomain.com/httpdocs/index.php on line XXX 访问/var/www/vhosts/maindomain.com/subdomain.maindomain.com/filename.php/var/www/vhosts/otherdomain.com/httpdocs/index.php/var/www/vhosts/maindomain.com/subdomain.maindomain.com中的此路径open_basedir

我还缺少什么?

有人有同样的问题吗?

由于

0 个答案:

没有答案