- Plesk for Linux
After upgrading a system PHP to the version 7.x on CentOS/RHEL-based distributions, PHP-FPM configuration fails and the service cannot be started:
# php-fpm -t
ERROR: [/etc/php-fpm.d/www.conf:1] value is NULL for a ZEND_INI_PARSER_ENTRY
ERROR: Unable to include /etc/php-fpm.d/www.conf from /etc/php-fpm.conf at line 1
ERROR: failed to load configuration file '/etc/php-fpm.conf'
ERROR: FPM initialization failed
The content of the file
/etc/php-fpm.d/www.confis as follows, containing # symbol at the beginning:
# cat /etc/php-fpm.d/www.conf
# Default www-pool configuration has been disabled by Plesk Panel.
# Pool configuration was saved in '/etc/php-fpm.d/www.conf.saved_by_psa'.
When creating a new subscription/domain in Plesk, the operation fails with the following error message:
PLESK_ERROR: Error: phpinimng failed: configuration test '/usr/sbin/php-fpm --test' failed with code 78, and message: ERROR: [/etc/php-fpm.d/www.conf:1] value is NULL for a ZEND_INI_PARSER_ENTRY ERROR: Unable to include /etc/php-fpm.d/www.conf from /etc/php-fpm.conf at line 1 ERROR: failed to load configuration file '/etc/php-fpm.conf' ERROR: FPM initialization failed
In Plesk log file
/var/log/plesk/panel.log, the following errors are shown:
CONFIG_TEXT: ERR  '/usr/local/psa/admin/bin/phpinimng' '--virtual-host' 'example.com' '--override' '/
var/www/vhosts/system/example.com/conf/php.ini' '--type' 'fpm' '--cgi-bin' '/usr/sbin/php-fpm' '--sysuser' 'sysuser' '--service' 'php-fpm' '--poold' '/etc/php-fpm.d' '--no-reload' failed with code 1.
Unable to update the config file for 'fpm' service due to syntax errors.
Subscription is associated with a Service Plan that selects PHP FPM by OS by default
In some cases, the following error message appears on the Home page in Plesk:
PLESK_ERROR: 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.
Template_Variable_Exception: No data.
Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
This is a Plesk bug with ID PPPM-9483 which will be fixed in upcoming Plesk updates.
Such behavior occurs after upgrading system PHP to 7.x version because PHP 7.x treats prefixes "
#" and "
Apply the following workaround:
Connect to a Plesk server via SSH
Back up the file
# cp -a /etc/php-fpm.d/www.conf /root/www.conf.backup
Replace hash symbols "#" with semicolons ";":
# sed 's/^#/;/g' -i /etc/php-fpm.d/www.conf