• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

open_basedir bug w/ php 4.4.2?

G

Gorgon@

Guest
Hi folks,

Running plesk v7.5.4 on RHEL v4. We have a site using oscommerce. They cannot upload images b/ they get this error in the logs:

PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File(/var/www/vhosts/example.com/httpdocs/images/browse_all.gif) is not within the allowed path(s): (/var/www/vhosts/example.com/httpdocs:/tmp) in /home/httpd/vhosts/example.com/httpdocs/admin/includes/classes/upload.php on line 94, referer: http://www.example.com/admin/categories.php?cPath=53_57&pID=122&action=new_product

I confirmed that open_basedir is set to:

php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/tmp"

in httpd.include.

As you can see, there is no slash at the end of httpdocs path. The directory oscommerce is trying to upload to is within the httpdocs directory. Yet, PHP insists that it's a violation of open_basedir.

I searched the forums here and did a big Google search and cannot find a defnitive answer. Has anyone see this before? Is there a bug in this version of PHP?

thanks,
mikeS
 
Has there been any resolution to this problem? I am experiencing the exact problem on a Plesk v8 server I manage.

Specifically I am getting the following error:

[client 202.67.67.79] PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File(/var/www/vhosts/buybuildingsupplies.com.au/httpdocs/images/6ADP5540WHs.jpg) is not within the allowed path(s): (/var/www/vhosts/buybuildingsupplies.com.au/httpdocs:/tmp) in /home/vhosts/buybuildingsupplies.com.au/httpdocs/admin/includes/classes/upload.php on line 100, referer: http://buybuildingsupplies.com.au/admin/categories.php?cPath=397&cID=860&action=update_category
 
Back
Top