open_basedir限制-php.ini针对Plesk Centosk 6


open_basedir restriction - php.ini against Plesk CentOS 6

有人知道是否可以包含{WEBSPACEROOT}PHP 5.5.22的父目录吗?

这是与{WEBSPACEROOT}一起工作的给定结构:

var/www/vhosts/mydomain-a/website  
var/www/vhosts/mydomain-a/includepath  
var/www/vhosts/mydomain-b/website  
var/www/vhosts/mydomain-b/includepath  

我想要这个:

var/www/vhosts/mydomain-a/website  
var/www/vhosts/mydomain-b/website  
var/www/vhosts/includepath  

我在根服务器上使用Plesk 12,但还没能在Plesk的php面板中解决这个问题。php.ini似乎被Plesk忽略了
所以我总是会收到这个错误:

 open_basedir restriction in effect. File(../../includepath/include.php) is not within the allowed path(s): (/var/www/vhosts/mysite.com/:/tmp/)  

我一直在研究这样的建议,但在我看来,它们确实意味着要解决第一种方法:https://www.vimp.com/de/web/faq/items/an-example-of-a-vhostconf-with-plesk.html

您的域的PHP处理程序是否像FastCGI一样工作?

您只需将域的PHP设置"open_basedir"更改为

/var/www/vhosts{/}{:}{WEBSPACEROOT}{/}{:}{TMP}{/}

在此之后的文件:

/var/www/vhosts/system/domain.tld/etc/php.ini

你会得到:

open_basedir = "/var/www/vhosts/:/var/www/vhosts/domain.tld/:/tmp/"