• 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

Need help for "open_basedir" error

klyde

New Pleskian
Hello.

I have this error on 1 of my website:
Error 2: mkdir(): open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/sexe-xxx.fr/httpdocs:/tmp); In file /var/www/vhosts/sexe-xxx.fr/httpdocs/xp_cron/dance.php, string 46

I know that I must use this http://kb.swsoft.com/article_41_432_en.html but I don't understand what I should use instead of "$HTTPD_VHOSTS_D" and "$THE_PATH_PHP_SCRIPT_TRIES_TO_ACCESS_TO"

With my error codes can someone say me what i should use instead of:

<Directory /$HTTPD_VHOSTS_D/domain.com/httpdocs>
php_admin_value open_basedir "$HTTPD_VHOSTS_D/domain.com/httpdocs:/tmp:/$THE_PATH_PHP_SCRIPT_TRIES_TO_ACCESS_TO"
</Directory>
Thanks a lot.
(Sorry my English isn't very good =/)
 
find this file /var/www/vhosts/sexe-xxx.fr/conf/httpd.include

and check out the open_basedir line.

you can copy that line and add all extra dirs.
 
I found this in httpd.include

<VirtualHost 193.24.215.16:80>
ServerName sexe-xxx.fr:80
ServerAlias www.sexe-xxx.fr
UseCanonicalName Off
ServerAdmin "*****@*****.com"
DocumentRoot /var/www/vhosts/sexe-xxx.fr/httpdocs
CustomLog /var/www/vhosts/sexe-xxx.fr/statistics/logs/access_log plesklog
ErrorLog /var/www/vhosts/sexe-xxx.fr/statistics/logs/error_log
<IfModule mod_userdir.c>
UserDir /var/www/vhosts/sexe-xxx.fr/web_users
</IfModule>
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory /var/www/vhosts/sexe-xxx.fr/httpdocs>
<IfModule mod_php4.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/sexe-xxx.fr/httpdocs:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/sexe-xxx.fr/httpdocs:/tmp"
</IfModule>
Options -Includes -ExecCGI
</Directory>
<Directory /var/www/vhosts/sexe-xxx.fr/web_users>
<IfModule mod_php4.c>
php_admin_flag engine off
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine off
</IfModule>
</Directory>
Include /var/www/vhosts/sexe-xxx.fr/conf/vhost.conf
</VirtualHost>
 
now locate the line starting with php_admin_value open_basedir

You can copy the complete line and paste it in the appropiate place and add the extra directory.

you should be able to figure out what $HTTPD_VHOSTS_D stands for.
 
Back
Top