• 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.

Renamed domain and open_basedir did not get set correctly

jas8522

Basic Pleskian
Just a tip for anyone else who might run into this issue.

A customer renamed their domain within Plesk. Everything got set properly by Plesk *except* the custom php.ini config variable for open_basedir, which remained with the old domain name. This resulted in errors like the following in the error_log:

[Mon Sep 10 17:51:34 2012] [warn] [client {ip}] mod_fcgid: stderr: PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/{OLD_DOMAIN}/httpdocs/:/tmp/) in /var/www/vhosts/{NEW_DOMAIN}/httpdocs/{DIR_TO_FILE} on line XYZ

I first tried telling Plesk to regenerate the configuration with the (outdated) command:

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost={NEW_DOMAIN}

But that did not work -- it reconfigured everything, but missed the open_basedir config variable yet again.

The solution was to manually edit the custom php.ini located at /var/www/vhosts/{NEW_DOMAIN}/etc/php.ini

And change:

open_basedir = "/var/www/vhosts/{OLD_DOMAIN}/httpdocs/:/tmp/"

To:

open_basedir = "/var/www/vhosts/{NEW_DOMAIN}/httpdocs/:/tmp/"

And all is now working as expected. I'm using Plesk 10.4.4 Update #36
 
Just a quick update to note that the same occurs with all subdomains associated with the domain. I then had to edit the etc/php.ini config for each subdomain to fix them as well.
 
Back
Top