• 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.

open_basedir restriction !?!?

J

JoaoCorreia

Guest
[client 195.23.115.68] PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home/httpd/vhosts/star-wear.net/httpdocs/images/test.jpg) is not within the allowed path(s): (/var/www/vhosts/star-wear.net/httpdocs:/tmp:/var/www/vhosts/star-wear.net/httpdocs/images) in /var/www/vhosts/star-wear.net/httpdocs/admin/includes/classes/upload.php on line 94, referer: http://www.star-wear.net/admin/categories.php?cPath=25_27&pID=169&action=update_product

I added the vhost.conf but its not working anyway. I still get an error and it doesnt upload the file.

Any tips
Joao Correia
 
No ideas, but have similar problems with the open_basedir.

I have a post running as well, just posted it a lil later. Also have one on the mambo forums as I ran into this with mambo.
 
Have a similar Problem with open_basedir.
Don't know how to figure it out.

Warning: %v%v() [function.%v]: open_basedir restriction in effect. File(/usr/share/php5/countries_list.php) is not within the allowed path(s): (/srv/www/vhosts/aaaa.com/httpdocs:/tmp) in /srv/www/vhosts/aaaa.com/httpdocs/init.php on line 257

in /etc/php5/apache/php.ini i have following:
;open_basedir =

In the http.include for that domain following:

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/srv/www/vhosts/aaaa.com/httpdocs:/tmp"

Does somebody know, whats wrong ?
 
My 'not so educated' guess would be that PHP is fu**ing up the path. With us the log says it's trying to load /include.php (well the filename is actually different but appearantly it tries to locate it in the root (/) which isn't ok ofcourse).

If PHP really thinks it should look in that path first open_basedir will conflict indeed. I just removed all settings for open_basedir (in which case it's unset and thus not used) and then it works fine, even though the file is in a whole other location (in some dir under the vhost stuff where the rest of the website is as well and that path actually _IS_ (well was by now :)) in the open_basedir setting...
 
Originally posted by freaky
My 'not so educated' guess would be that PHP is fu**ing up the path. With us the log says it's trying to load /include.php (well the filename is actually different but appearantly it tries to locate it in the root (/) which isn't ok ofcourse).

If PHP really thinks it should look in that path first open_basedir will conflict indeed. I just removed all settings for open_basedir (in which case it's unset and thus not used) and then it works fine, even though the file is in a whole other location (in some dir under the vhost stuff where the rest of the website is as well and that path actually _IS_ (well was by now :)) in the open_basedir setting...

could you explain what i should do in my case ?

Remove the whole entry in http.include with open_basedir ?

th@nks
 
@JoaoCorreia: have you checked the folder permissions? (chmod/chown)
 
I had to setup a vhost.conf. However, note that the PHP values were NOT overriden unless I put them in a directory container like so:
<Directory var/www/vhosts/domain/httpdocs>
php_admin_value open_basedir =
php_admin_flag safe_mode = 0
</Directory>

Hope this helps
 
Back
Top