• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue open_basedir changes not working

serial

New Pleskian
Hi,

I try to access a file in from php in websiteA in websiteB homedir.

For example test.php in websiteA
<? require('/home/httpd/vhosts/<domainb>/httpdocs/testinclude.php');
?>

When i do that i will get a open_basedir restriction as expected and a 500 error
[Sun Mar 17 14:34:18.055943 2019] [proxy_fcgi:error] [pid 27457] [client xxxxx:37021] AH01071: Got error 'PHP message: PHP Warning: require(): open_basedir restriction in effect. File(/home/httpd/vhosts/<siteb>/httpdocs/testinclude.php) is not within the allowed path(s): (/home/httpd/vhosts/<sitea>/:/tmp/) in /home/httpd/vhosts/<sitea>/httpdocs/test.php


All the documentation i can find point in the direction to change the open_basedir path in the php settings in plesk onyx

So i go to domain->php settings->open_basedir
I enter {WEBSPACEROOT}{/}{:}{TMP}{/}:/home/httpd/vhosts/<websiteb/httpdocs/

Save the whole stuff and try again, unfortunately
[Sun Mar 17 14:35:18.055943 2019] [proxy_fcgi:error] [pid 27457] [client 149.210.167.40:37021] AH01071: Got error 'PHP message: PHP Warning: require(): open_basedir restriction in effect. File(/home/httpd/vhosts/<siteb>/httpdocs/testinclude.php) is not within the allowed path(s): (/home/httpd/vhosts/<sitea>:/tmp/:/home/httpd/vhosts/<siteb>/httpdocs/) in /home/httpd/vhosts/<sitea>/httpdocs/test.php

Any ideas ?

I've tried chmod 777 the file, but nothing seems to help.
 
This is not possible. You cannot access any files of domainB from domainA, regardless of open_basedir settings.
 
Back
Top