简体   繁体   中英

open_basedir restriction - php.ini against Plesk CentOS 6

Does anyone know if it is possible to include a parent directory of a {WEBSPACEROOT} PHP 5.5.22?

This is the given structure which does work with {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  

I want this:

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

I am using Plesk 12 with a root server and haven't been able to solve the issue within the php-panel of Plesk. The php.ini seems to be ignored by Plesk.
So I will always receive this error:

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

I have been looking into suggestions like this, but they do seem to me like if they would imply tackle the very first approach: https://www.vimp.com/de/web/faq/items/an-example-of-a-vhostconf-with-plesk.html

Does your domain's PHP handler works as FastCGI?

You can just change domain's PHP settings "open_basedir" to

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

After this in file:

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

you'll get:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM