• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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