• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Bug? File is below active open_basedir setting, but not seen by php

G

gecon

Guest
Hello,

I'm dealing with a problem related to php and the open_basedir setting.
Running Plesk 8.0.1.

The error I'm getting when requesting a web page is is a typical: "open_basedir restriction in effect."
but there seems that this shouldn't happen, since the requested file is below the defined directories in open_basedir restriction.

Here are some details.

In file:
/var/www/vhosts/asite.com/conf/httpd.include

there is:

Code:
<IfModule sapi_apache2.c>
                php_admin_flag engine on
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/var/www/vhosts/asite.com/httpdocs:/tmp"
 </IfModule>

and there isn't any vhost.conf file in:
/var/www/vhosts/asite.com/conf/

I'm requesting by using a browser the following:
http://www.asite.com/admin/index.php?action=products&sub=view
which gives the following error:

Warning: main() [function.main]: open_basedir restriction in effect.
File(/action_products_view.php) is not within the allowed path(s): (/var/www/vhosts/asite.com/httpdocs:/tmp) in /var/www/vhosts/asite.com/httpdocs/admin/modules/action_products.php on line 5
Warning: main() [function.include]: Failed opening 'action_products_view.php' for inclusion (include_path='.:') in /var/www/vhosts/asite.com/httpdocs/admin/modules/action_products.php on line 5

The line 5 of the php source code (file: /var/www/vhosts/asite.com/httpdocs/admin/modules/action_products.php) in which the warning is given is just a:
Code:
include("action_products_view.php");

and the file:
/var/www/vhosts/asite.com/httpdocs/admin/modules/action_products_view.php
exists (it is in the same directory with the file making the include and below the allowed paths in open_basedir).

What might be wrong?
From the warning it seems like the
Code:
include("action_products_view.php");
generates a requests for: /action_products_view.php
(in site's root directory) - not a relative to the existing request.

Has anyone seen this and fixed this?
I don't want to remove the open_basedir restriction (by setting it to 'none' or to '/'). Any ideas?

Thank you.
 
Back
Top