Applicable to:
- Plesk for Linux
Symptoms
-
Unable to create domain or subdomain with the following error:
PLESK_ERROR: Error: phpinimng failed: Unable to update the config file for 'fpm' service due to syntax errors. New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: No data. file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Variable_Exception: No data. file: /usr/local/psa/admin/plib/Template/Variable/AbstractCachedData.php line: 67 code: 0.
-
Unable to create a subscription via an API call. Plesk returns the following response:
CONFIG_TEXT: ...
<result>
<status>error</status>
<errcode>2204</errcode>
<errtext>Unable to update hosting preferences. phpinimng failed: Unable to update the config file for 'fpm' service due to syntax errors.</errtext>
</result>
... -
Cannot enable hosting for the domain with 'No hosting' of 'Forwarding' type:
PLESK_ERROR: Error: phpinimng failed: configuration test '/opt/plesk/php/7.3/sbin/php-fpm --test' failed with code 78, and message:
[21-Dec-2018 14:32:20] ERROR: [pool example.com] the prefix '/var/www/vhosts/system/example.com' does not exist or is not a directory
[21-Dec-2018 14:32:20] ERROR: failed to post process the configuration
[21-Dec-2018 14:32:20] ERROR: FPM initialization failed -
php-fpm service fails to restart with the following error:
# systemctl restart php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-12-01 18:45:39 +07; 9s ago
Dec 01 18:45:39 hostname php-fpm[14050]: [01-Dec-2017 18:45:39] ERROR: [pool example.com] the prefix '/var/www/vhosts/system/example.com' does not exist or is not a directory
Dec 01 18:45:39 hostname php-fpm[14050]: [01-Dec-2017 18:45:39] ERROR: failed to post process the configuration
Dec 01 18:45:39 hostname php-fpm[14050]: [01-Dec-2017 18:45:39] ERROR: FPM initialization failed -
Hosting type for example.com is set to forwarding:
-
There is php-fpm pool configuration file for example.com:
# ls -l /etc/php-fpm.d/example.com.conf
-rw-r--r--. 1 root root 1367 Oct 19 17:24 /etc/php-fpm.d/example.com.confor
# ls -l /etc/php/X.X/fpm/pool.d/sub.example.com.conf
-rw-r--r--. 1 root root 1367 Oct 19 17:24 /etc/php/X.X/fpm/pool.d/sub.example.com.confwhere X.X is an appropriate PHP version
Cause
php-fpm
service fails to start as domain's php-fpm pool configuration file was not removed after changing the hosting type to forwarding or removing the domain.
Resolution
-
Log into the server via SSH;
-
Delete PHP-FPM pool configuration file:
# rm -f /etc/php-fpm.d/example.com.conf
# rm -f /etc/php/X.X/fpm/pool.d/sub.example.com.conf
-
Start php-fpm service:
# service php-fpm start
Note: application pools of domains using PHP handlers provided by Plesk are located in /opt/plesk/php/*/etc/php-fpm.d/
Comments
6 comments
Doesnt work:
[root@m3 ~]# service start php-fpm
start: unrecognized service
[root@m3 ~]# systemctl start php-fpm
-bash: systemctl: command not found
[root@m3 ~]# systemctl start php-fpm.service
-bash: systemctl: command not found
Version 17.5.3 Update #43, last updated on Mar 30, 2018 12:56 PM
@Marcos
Hello,
Which PHP version was used for domain?
For domains that used PHP handlers provided by Plesk delete config file not from /etc/php-fpm.d/, but from /opt/plesk/php/X.Y/etc/php-fpm.d/, where X.Y is a PHP version.
For CentOS 6 use the command to start PHP service:
service plesk-phpXY-fpm start
Hi,
Hello @Chris,
Does this error occur on domain/subdomain creation?
Additional troubleshooting is required to find a solution.
I suggest the following steps:
1. Enable debug: https://support.plesk.com/hc/en-us/articles/213408889-How-to-enable-disable-Plesk-debug-mode-
2. Reproduce the issue.
3. Check messages nearby the error message in panel log (/var/log/plesk/panel.log).
4. Search for a solution in our knowledge base.
In case this would not help, submit a request to Plesk support.
Hi, this is solved i installed python 3 and made it default, i contacted my hosting company and they created a
sym link for me that fixed the issue
@Chris, thank you for sharing the information.
It may be helpful for other Pleskians.
Please sign in to leave a comment.