• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question OpenBasedir: Can't include file from other domain

TimoSchwiersch

New Pleskian
Hi,

I try to include a common directory, in which I's like to store a few classes that I use in multiple projects.
I added the location to the PHP-configuration:

{WEBSPACEROOT}{/}{:}{TMP}{/}{:}{/}var{/}www{/}vhosts{/}domain1.de{/}common.domain1.de{/}inc{/}classes{/}

Then I tried to include one file:

<?php
require_once('/var/www/vhosts/domain1.de/common.domain1.de/inc/classes/input.cls.php');
$Input = new Input('test', 'select');​

But all i got was an error that the path "xyz" is not within the allowed path(s) "...:xyz"

[Wed Feb 14 09:50:08.832661 2018] [proxy_fcgi:error] [pid 6499:tid 140591721580288] [client 87.191.194.184:60720] AH01071: Got error 'PHP message: PHP Warning: require_once(): open_basedir restriction in effect. File(/var/www/vhosts/domain1.de/common.domain1.de/inc/classes/input.cls.php) is not within the allowed path(s): (/var/www/vhosts/domain2.de/:/tmp/:/var/www/vhosts/domain1.de/common.domain1.de/inc/classes/) in /var/www/vhosts/domain2.de/httpdocs/test.php on line 2
PHP message: PHP Warning: require_once(/var/www/vhosts/domain1.de/common.domain1.de/inc/classes/input.cls.php): failed to open stream: Operation not permitted in /var/www/vhosts/domain2.de/httpdocs/test.php on line 2
PHP message: PHP Fatal error: require_once(): Failed opening required '/var/www/vhosts/domain1.de/common.domain1.de/inc/classes/input.cls.php' (include_path='.:/usr/share/php') in /var/www/vhosts/domain2.de/httpdocs/test.php on line 2'​

It is EXACTLY the same path. So whats my fault? I'm confused...

Thanks for your help.
Timo.
 
Back
Top