• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forwarded to devs PHP breaks for additional domain if the parent subscription is renamed

burnley

Regular Pleskian
TITLE:
PHP breaks for additional domain if the parent subscription is renamed
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
CentOS Linux 7.5.1804 (Core)‬
Product Plesk Onyx Version 17.5.3 Update #47, last updated on May 15, 2018 12:42 PM
PROBLEM DESCRIPTION:
If the subscription is renamed any additional domains part of the subscription will retain the previous php configuration, however since the subscription got renamed the path on the disk is now different and the open_basedir value for the additional domains php handlers becomes invalid​
STEPS TO REPRODUCE:
1. Create new subscription and name it 0dom1.local. Use php-fpm as handler. Test phpinfo, make sure it works.
2. Create an additional domain under 0dom1.local and name it 0dom1-1.local. Use php-fpm as handler. Test phpinfo, make sure it works.
3. Rename the subscription as 0dom1-ren1.local. Wait for the task to complete, then go to the additional domain 0dom1-1.local and test phpinfo again. It'll come up with "Error: Unable to retrieve information about the PHP configuration."
4. Check /var/www/vhosts/system/0dom1-1.local/logs/error_log, you'll see this:
[Tue May 29 12:29:41.385756 2018] [proxy_fcgi:error] [pid 30111:tid 140142503311104] [client 192.168.1.240:48754] AH01071: Got error 'PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/0dom1-ren1.local/0dom1-1.local/__info0.php) is not within the allowed path(s): (/var/www/vhosts/0dom1.local/0dom1-1.local/:/tmp/) in Unknown on line 0\nPHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0\nUnable to open primary script: /var/www/vhosts/0dom1-ren1.local/0dom1-1.local/__info0.php (Operation not permitted)\n'​
ACTUAL RESULT:
php breaks for the additional domains​
EXPECTED RESULT:
After renaming the subscription open_basedir value should be updated for all additional domains and the corresponding php-fpm handlers are reloaded.​
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
From developer:

I was able to reproduce the issue only in conditions if the value "open_basedir" in PHP settings of 0dom1-1.local specified as exact path:

/var/www/vhosts/0dom1.local/0dom1-1.local{/}{:}{TMP}

{/}

In case "open_basedir" value specified using the variable, domain renaming not affect to PHP configuration:

{WEBSPACEROOT}{/}{:}{TMP}{/}

 
Yep, that's exactly right, if using {WEBSPACEROOT}{/}{:}{TMP}{/} everything is fine. However the default setting is {DOCROOT}{/}{:}{TMP}{/}
 
Just thought we should add while {WEBSPACEROOT} side steps the problem it also breaks isolation between the various sites in the subscription. So if one of the sites gets hacked they can run code on the others sites in the subscription - not a good security outcome if you ask me... Rename should work with {DOCROOT}{/}{:}{TMP}{/} so as to allow open_basedir to work properly.
 
Вug PPPM-8653 confirmed.

The issue occurs with {DOCROOT} {/}{:}{TMP}{/}

open_basedir value.
 
Back
Top