• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.

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