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