• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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