open_basedir restriction in effect. File(/) is not within the allowed path(s):

后端 未结 13 2492
醉话见心
醉话见心 2020-11-22 01:45

I\'m getting this error on an avatar upload on my site. I\'ve never gotten it before and nothing was changed recently for me to begin getting this error...

         


        
13条回答
  •  佛祖请我去吃肉
    2020-11-22 02:41

    For me the problem was bad/missing config values for the Plesk server running the whole thing. I just followed the directions here: http://davidseah.com/blog/2007/04/separate-php-error-logs-for-multiple-domains-with-plesk/

    You can configure PHP to have a separate error log file for each VirtualHost definition. The trick is knowing exactly how to set it up, because you can’t touch the configuration directly without breaking Plesk. Every domain name on your (dv) has its own directory in /var/www/vhosts. A typical directory has the following top level directories:

    cgi-bin/
    conf/
    error_docs/
    httpdocs/
    httpsdocs/
    ...and so on
    

    You’ll want to create a vhost.conf file in the domain directory’s conf/ folder with the following lines:

    php_value error_log /path/to/error_log
    php_flag display_errors off
    php_value error_reporting 6143
    php_flag log_errors on
    

    Change the first value to match your actual installation (I used /tmp/phperrors.log). After you’re done editing the vhost.conf file, test the configuration from the console with:

    apachectl configtest
    …or if you don’t have apachectl (as Plesk 8.6 doesn’t seem to)…
    
    /etc/init.d/httpd configtest
    

    And finally tell Plesk that you’ve made this change.

    /usr/local/psa/admin/bin/websrvmng -a
    

提交回复
热议问题