No PHP versions found for mode fpm

Hello!

I’m trying to run Virtualmin with two main PHP versions, 5.4 and 7.2. Both these versions was installed with Remi Repo. I have removed all php versions pre-installed with virtualmin.

And now I’m getting this error:

Setting up PHP pool .. .. Nginx website failed! : virtualmin-nginx::feature_setup failed : No PHP versions found for mode fpm at /usr/libexec/webmin/web-lib-funcs.pl line 1493.

And when checking the configuration I see this warning:

The following PHP versions are available : 5.4.45 (/bin/php54-cgi), 7.2.10 (/bin/php72-cgi) PHP-FPM support was not detected : No FPM configuration directory found

Can anyone help me?

@EDIT

Posted the workarround in the next post, to see bettter.

About the workarround for the erros listed before…I make changes for myself.

/usr/libexec/webmin/virtualmin-server/php-lib.pl

Change this:

Config directory for per-domain pool files

foreach my $cdir ("/etc/php-fpm.d", “/etc/php*/fpm/pool.d”,
“/etc/php/*/fpm/pool.d”) {

For that:

Config directory for per-domain pool files

foreach my $cdir ("/etc/php-fpm.d", “/etc/php*/fpm/pool.d”,
“/etc/php/*/fpm/pool.d”, “/opt/remi/php54/root/etc/php-fpm.d”, “/etc/opt/remi/php72/php-fpm.d”) {

Change this:

foreach my $init (“php-fpm”, “php5-fpm”, “php7-fpm”,
(map { “php${}-fpm" } @all_possible_php_versions),
(map { "rh-php${
}-php-fpm” } @nodot),
(map { “php${_}-php-fpm” } @nodot)) {

For that:

foreach my $init (“php-fpm”, “php54-php-fpm”, “php72-php-fpm”,
(map { “php${}-fpm" } @all_possible_php_versions),
(map { "rh-php${
}-php-fpm” } @nodot),
(map { “php${_}-php-fpm” } @nodot)) {

Another question

Can anyone say me how to edit the defaul nginx-config parameters for new sites? I was using the other plugin, like RealGecko (https://github.com/Real-Gecko/virtualmin-nginx-fpm), and in there plugin I can change the defaults simple in file virtualmin-nginx-fpm-lib.pl Now I was searching something about /usr/libexec/webmin/virtualmin-nginx/virtualmin-nginx-lib.pl but here I don’t see anything easy to modify and I can broke virtualmin.

And for PHP-FPM, is there possible to run 2 versions together? Like PHP?