• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

help me plesae i can't upload file please

R

roommini

Guest
PHP Warning: Unknown: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/usr/local/www/vhosts/doamin/httpdocs:/tmp) in Unknown on line 0, referer: doamin.com
[Sat Jul 28 11:20:04 2007] [error] [client 124.120.5.210] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0, referer: doamin

it cannot upload all of file or script

:confused:

plesk 8.2

freebsd 6.1
 
maybe you should set all lines of open_basedir in http.include for that domain to "none"and restart apache. I dont know where it's located in a freebsd but in linux you can find it in /var/www/vhosts/domain/conf/.

Also make sure it is turned off in php.ini

Hope that helps
 
Don't turn off open_basedir ,
Just set the open_basedir in /home/vhosts/domain.com/conf/vhost.conf

FYI /var/tmp should be a symlink to /tmp on your freebsd system anyway, so /tmp should cover it.

Code:
<Directory "/home/vhosts/domain.com/httpdocs/">
        <IfModule sapi_apache2.c>
                suPHP_Engine On
                php_admin_flag engine on
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/httpdocs:/tmp:/var/tmp"
                php_admin_value memory_limit 100M
        </IfModule>
        <IfModule mod_php5.c>
                suPHP_Engine On
                php_admin_flag engine on
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/httpdocs:/tmp:/var/tmp"
                php_admin_value memory_limit 100M
        </IfModule>
</Directory>
It can still be used without the "Directory" directive...
Code:
php_admin_value open_basedir "/home/vhosts/domain.com/httpdocs:/tmp:/var/tmp"
 
I had this same problem today on FreeBSD 6.2 after a recent installation of Plesk 8.2. rather than changing any configuration files, I noticed that /var/tmp is definitely an actual directory on the filesystem, rather than being symlinked to /tmp. So, to fix this, I :

1. Delete the /var/tmp folder
2. Created a new symbolic link from /var/tmp to /tmp
ln -s /tmp /var/tmp

After this (and restarting Apache to be sure), the open_basedir error went away.

I checked on a few different (non-Plesk) FreeBSD systems here, and /var/tmp seems to be an actual folder on all of them (rather than a symlink to /tmp as it may be on other *nixes). This may be helpful to anyone doing a fresh install on a FreeBSD box.
 
Back
Top