I habe a new server with PHP8 and added PHP7.4 later. I changed some settings like MEMORY_LIMIT, POST_MAX_SIZE, … and saved them. After that, PHP 7.4 won’t come up. The debug output is
STOPPEDas of10.1.2022, 15:47:54
php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-01-10 14:44:26 UTC; 3min 27s ago
Docs: man:php-fpm7.4(8)
Process: 1668 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=78)
Process: 1674 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Main PID: 1668 (code=exited, status=78)
Jan 10 14:44:26 myproject-golive systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Jan 10 14:44:26 myproject-golive php-fpm7.4[1668]: [10-Jan-2022 14:44:26] ERROR: Another FPM instance seems to already listen on /run/php/php8.0-fpm-myproject-alt.sock
Jan 10 14:44:26 myproject-golive php-fpm7.4[1668]: [10-Jan-2022 14:44:26] ERROR: FPM initialization failed
Jan 10 14:44:26 myproject-golive systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/CONFIG
Jan 10 14:44:26 myproject-golive systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Jan 10 14:44:26 myproject-golive systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
Jan 10 14:44:33 myproject-golive systemd[1]: php7.4-fpm.service: Unit cannot be reloaded because it is inactive.
Jan 10 14:45:17 myproject-golive systemd[1]: php7.4-fpm.service: Unit cannot be reloaded because it is inactive.
Jan 10 14:45:53 myproject-golive systemd[1]: php7.4-fpm.service: Unit cannot be reloaded because it is inactive.
Jan 10 14:47:53 myproject-golive systemd[1]: php7.4-fpm.service: Unit cannot be reloaded because it is inactive.
Is there a conflict between PHP 7.4 and 8 because of this line?
ERROR: Another FPM instance seems to already listen on /run/php/php8.0-fpm-myproject-alt.sock
Hi anish, I updated all settings using the UI. The only manual change was to run
pecl install redis
and adding
extension=redis.so
to /etc/php/8.0/fpm/php.ini and /etc/php/8.0/cli/php.ini.
As a workaround, I removed PHP8 from the server yesterday. After that, PHP 7.4 was working again. I just reinstalled PHP8 and rebootet the server, now PHP 7.4 has stopped working as before.
I think I found out the issue but do you have any ways to reproduce this? Or do you remember anything you did on the server by SSHing into it?
NGINX config of your WP site that uses PHP 7.4 is using configs of PHP 8.0.
If all you did is update configs via Cleavr only then we really need to dig into it to find the root cause of the issue so any repro steps would be useful.
what I did: I installed a Laravel optimized server and added a Laravel application (no problem). By default, the Laravel optimized server installed PHP 8.0. I played around with the Laravel nginx-config, because I wanted to add some redirections. I also redis (see above).
After that, I installed added a WordPress site - using PHP 8.0. Because I have some problems with this site and I want to check, if they correspond with PHP 8.0, I added PHP 7.4 as additional service to the server and switched the site configuration to PHP 7.4. The site was working, but my problems persist, that’s why I changed MEMORY_LIMIT and some other paramerers (only using the Cleaver UI). Because PHP 7.4 won’t come up, I restarted the server - same result, the problems as described above.
All changes to the WordPress site have been made using the UI. I did not tweak any configuration (for the WP site) by SSH.
There is also an install option for Redis in Cleavr. Is there a special reason that you didn’t used that one?
I think it’s always a good plan to use the CP functions first
The Laravel optimized Server already contains the Redis service, but when I try to use Redis, Laravel provided me an error message. As described here you need a PHP Redis extension. That’s why I had to run
I’m using always the App server type and install later the required “modules” like php and redis. Never installed the php redis extension manually. Actually it makes no sense to install php and redis for the laravel server type and not the php extension. Maybe this is something that @amiedema will check?
It now should be added with new PHP installs. If you have PHP currently running, you can either uninstall / reinstall PHP or SSH into the server and run the following command:
Go with PHP 8.0 for WordPress, even it has introduced many supportive changes with 5.9 for PHP 8.1 some parts are still not optimized for 8.1. Same goes for WooCommerce. I guess 8.1 will be fully supported with the release of WP 6. Also take care of third-party plugins (not from automatic) as those follow other or even no rules at all.