Switch from php-fpm to cgi - server messed up


System: Ubuntu 18.04.1 LTS x64, Linux 4.15.0-109-generic on x86_64
Usermin: 1.803
Webmin: 1.954
Virtualmin: 6.11
Apache version: 2.4.29
PHP versions: 7.2.33, 7.4.9

For a long time i have used php-fpm 7.2 without any problems. Yesterday i installed php 7.4 and from now on i dont have any php-fpm option anymore to select. When i run check-configuration, virtualmin tells me that there is no php-fpm version installed.

If i add a new virtual server, i can only choose cgi or fcgi as php execution mode. But the old virtual servers has none of these two options checked. but they are running without any problems.

The new virtual server instead doesnt run. the error message is:
No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.2-fpm.sock (*) failed

Before i mess up my server/installation completly, i would like to ask you for some help.

My questions now are:

  1. is there any drawback in using cgi or fcgi php instead of the fpm one?
  2. how can i restore a stable state? I am also willed to remove php 7.4, but i would like to be able to switch between 7.2 and 7.4

Thank you for your help!

Server is running again.
I had to remove the virtualserver and add it again…
Dont know what happened to the old ones… Since they dont have any options checked… Better dont touch them. They have still php-fpm configs in their config file.

EDIT ------- NOOO, server is just serving html files. PHP still not working


I had to rename

/etc/apache2/conf-available/php7.2-cgi.conf.conf to /etc/apache2/conf-available/php7.2-cgi.conf_disabled

/etc/apache2/conf-available/php7.2-fpm.conf to /etc/apache2/conf-available/php7.2-fpm.conf_disabled

Then sudo service apache2 restart.

This allowed me to switch to FCGI instead of PHP-FPM as a workaround.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.