• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question open_basedir plesk error

certurt22

New Pleskian
Server operating system version
OVH VPS
Plesk version and microupdate number
Obsidian 18.0.26
I'm attempting to load a script from a different webspace within Plesk. I've enabled `open_basedir` in the webspace settings, and in my script, I'm using the following line:

```php
include "/var/www/vhosts/krsoft/httpdocs/app/";
```

However, this isn't functioning as expected, and I'm encountering the subsequent errors in my log:

```
mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/krsoft/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/krsoft/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/krsoft/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'm guessing that the issue might be with the way I'm specifying the file path. I'm having trouble understanding the correct format to use. This error often causes issues on [redacted], and I need help to resolve the problem.
 
Last edited by a moderator:
Thank you for posting. At the moment we only see that something does not work correctly. Could you please also show the lines in your script, because these are crucial to determine what is wrong in the script.

In general I can strongly discourage loading resources across subscriptions this way, because despite an open_basedir permission, the file owner of the read file is still different. It is just a bad practice doing this.
 
I don't know how to demonstrate the example. If you could visit [redacted], you would see that the error page appears on its own after refreshing for a certain period of time.
 
Last edited by a moderator:
Seeing the error won't help the case. For sure there is an error as you say, but to solve it it will be necessary to see the script lines that try to access the file.
 
Back
Top