Symptoms
Attempting to start Apache PHP-FPM fails with the following error:
Active: failed (Result: exit-code) since Fri 2021-11-12 19:31:28 EST; 35ms ago
Process: 5666 ExecStart=/opt/cpanel/ea-php54/root/usr/sbin/php-fpm --nodaemonize
(code=exited, status=254)
Main PID: 5666 (code=exited, status=254)
systemd[1]: Starting The PHP FastCGI Process Manager...
systemd[1]: ea-php54-php-fpm.service: main process exited, code=exited, status=254/n/a
systemd[1]: Failed to start The PHP FastCGI Process Manager.
systemd[1]: Unit ea-php54-php-fpm.service entered failed state.
systemd[1]: ea-php54-php-fpm.service failed.
at /usr/local/cpanel/Cpanel/PHPFPM/Controller.pm line 140.
Cpanel::Exception::Services::RestartError
Service Status
Found 4 versions of PHP-FPM: 72 54 56 70
Service Error
(XID rpyfdv) The “apache_php_fpm” service failed to restart because
the restart script exited with an error:
apache_php_fpm has failed. Contact your system administrator if
the service does not automagically recover.
Description
PHP errors can cause PHP-FPM to fail during a restart. If PHP-FPM suddenly started failing. It is best to review all changes that recently were performed. In this instance "php -v" returned 0 out.
[ ~]cPs# ea-php54 -v
[ ~]cPs# ea-php54 -i
[ ~]cPs# ea-php54 -m
Upon further inspection, the error_log file in the current working directory provided errors.
cat error_log
[13-Nov-2021 01:59:46 UTC] PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
[13-Nov-2021 02:00:04 UTC] PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
[13-Nov-2021 02:00:39 UTC] PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
[13-Nov-2021 02:00:42 UTC] PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
[13-Nov-2021 02:00:43 UTC] PHP Fatal error: [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0
The extension is attempting to be loaded twice, preventing PHP-FPM from starting.
Workaround
Check PHP configuration files for other matches to ensure the extension is only loaded once.
grep ZendGuardLoader.so /opt/cpanel/ea-php54/root/etc/php.d/*
Removing file zendopt.ini resolved the issue as PHP is already natively loading the extension in another configuration.
grep ZendGuardLoader.so /opt/cpanel/ea-php54/root/etc/php.d/*
/opt/cpanel/ea-php54/root/etc/php.d/zendguard.ini:zend_extension="/opt/cpanel/ea-php54/root/usr/lib64/php/modules/ZendGuardLoader.so"
/opt/cpanel/ea-php54/root/etc/php.d/zendopt.ini:zend_extension=/opt/cpanel/ea-php54/root/usr/lib64/php/modules/ZendGuardLoader.so
Comments
0 comments
Article is closed for comments.