I am trying to load a script from another webspace in plesk. I enabled open_basedir in the webspace and in my script I insert
include "/var/www/vhosts/example.com/httpdocs/app/";
However this is not working and I receive the following errors in log:
mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/eshop): failed to open stream: No such file or directory in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2
mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/app): failed to open stream: No such device in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2
mod_fcgid: stderr: PHP Warning: include(): Failed opening '/var/www/vhosts/example.com/httpdocs/app/' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2
I assume that it has to do with the fact that I am writing the path in a wrong way but I cant understand what is the correct one.
It doesn't work because of files of another subscription are owned by another system user.
It's better to place necessary code in same subscription or in some shared place like /usr/share/pear
or /usr/share/php
: