Applicable to:
- Plesk for Linux
Symptoms
- Main domain
example.com
has PHP version, for example, 7.1. - Sub-domain
subdomain.example.com
is created via CLI with PHP handler version of, for example, 7.2:
# plesk bin subdomain --create subdomain -webspace-name 'example.com' -domain example.com -php_handler_id plesk-php72-fpm
-
In Domains > subdomain.example.com > PHP Settings > View the phpinfo() page can be seen that PHP 7.1 is in use.
- FPM configuration file for
subdomain.example.com
is located in the pool of PHP 7.1:
# find /opt/plesk/php/ -name "*subdomain.example.com*"
/opt/plesk/php/7.1/etc/php-fpm.d/subdomain.example.com.conf - Sub-domains created via API have the same issue.
Cause
Plesk bug PPPM-7753 that is planned to be fixed in one of the future product updates.
Resolution
Note: The solution is compiled with versions of PHP mentioned in the symptoms in mind.
Until a fix becomes available to use the following instruction:
- Go to Domains > subdomain.example.com > PHP settings
- Select PHP version other than the required one and click Apply
- Select the required PHP version and click Apply
Also, it is possible to switch it back and forth via the command line:
-
Log in to Plesk using SSH.
-
Execute the following commands:
# plesk bin domain -u subdomain.example.com -php_handler_id plesk-php71-fpm
# plesk bin domain -u subdomain.example.com -php_handler_id plesk-php72-fpm
Additional Information
Unable to create the domain: Unable to update the config file for 'fpm' service due to syntax errors
Comments
0 comments
Please sign in to leave a comment.