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

help me plesae i can't upload file please

Discussion in 'Plesk for Linux - 8.x and Older' started by roommini, Jul 27, 2007.

  1. roommini

    roommini Guest

    0
     
    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
     
  2. shoggy24

    shoggy24 Regular Pleskian

    25
    57%
    Joined:
    Apr 5, 2007
    Messages:
    198
    Likes Received:
    0
    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
     
  3. DCoats

    DCoats Guest

    0
     
    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"
     
  4. jrlo2

    jrlo2 Guest

    0
     
    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
    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.
     
Loading...