• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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