• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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