1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

open_basedir bug w/ php 4.4.2?

Discussion in 'Plesk for Linux - 8.x and Older' started by Gorgon@, Jul 27, 2006.

  1. Gorgon@

    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?

  2. cngarrison

    cngarrison Guest

    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] 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