PHP FPM-Integration and restart php

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Webmin version 2.010
Usermin version 1.860
Virtualmin version 7.5
Theme version 20.10
Package updates All installed packages are up to date

I’ve installed Virtualmin / Apache with multiple php-versions.
If I look into /etc/php there are

  • cli
  • cgi
  • fpm

But in Virtualmin Tools > PHP Configuration per default, there are only cgi and cli configs listed…
It’s easy if you know how to solve this… in the Module-Settings of PHP… but could you please make it per default this way to also show fpm config-files:

And it would be awesome to have such an “reload php” Functionality for FPM like in sections of other Services (like Apache):

Else it’s a bit hard to run the restart command for each php-version on the cli:

service php5.6-fpm restart
service php7.4-fpm restart
service php8.0-fpm restart
service php8.1-fpm restart
service php8.2-fpm restart

@suther,

When you update a PHP setting in the proper way via Virtualmin, it will automatically restart PHP-FPM.

When you install new versions of PHP correctly they will become manageable by Virtualmin.

They are manageable… but only after I do edit the pattern to also show fpm files from /etc/php…

Maybe to be sure somebody could check if this could be added OOTB to virtualmin or if that the case even on a brand new setup?

@suther,

I’m saying, adding a new version of PHP properly shouldn’t require any editing of any configuration to get them working.

I’ve started off a system that had “PHP 8.1” then proceeded to add “PHP 8.2” and “PHP 7.4”, each of which became manageable without editing anything prior to.

Seems you might be doing something wrong if you have to edit something.

In Virtualmin > System Settings > Re-Check configuration
Will pull in all your php versions along with any running php-fpm

After that you should have on your Dashboard under Server Status all your php-fpm servers with stop and restart functions.

In virtualmin under each account:
Services > PHP-FPM Configuration

Edit to add:
If you did the first Re-Check Configuration option than you will be able to see the php-fpm servers under
Webmin > Tools > PHP Configuration

Ok, strange. I didn’t do anything special to install those php-versions - as far as I remember.
But thanks for your response

I think I’ve used this multiple times - as I do playing around a bit with this test-server.
As the PHP-Installation was pretty early at this server, I think this “re-check config” didn’t do the job as you mentioned.

But if this “generally” is no Bug, then it’s ok for me. I only would like to contribute feedback to optimize VM / webmin.

In before @Joe sees that you have mod_php installed and tells you to get rid of it.

Seriously. That messes up pretty much everything. Settings you make may or may not be taken seriously by your system with that installed.

Where did he mention it? In another thread? Don’t noticed that. Can you give a link please?

It’s everywhere. All the time. Trust me. Use the search feature and enter mod_php. It is THE number one breaker of all things.

Ok, it’s reads like “joe hat told it especially to me, as he’d seen it on one of my request”.

But you mean it as general hint, that joe often suggest to remove mod_php, because it is the cause of many issues?!

Pal, since you seem to be THAT lazy, I’ll help you out one time. It took exactly 5 seconds to find this:

Continuing the discussion from Debian 9 update breaks PHP:

I apologize for the misunderstanding. It’s probably my fault.
I’m not to lazy to search…

Your sentence structure was just confusing or difficult to understand to me.

It sounded like you were referring to a dialogue between me and Joe. But since I wasn’t aware that I’d asked this before and since I didn’t see a response from Joe here in the thread. (I’m also just a human, it might be that I’ll ask that before but forget it…, that’s why I just ask you for that)

So it seems to be just a simple language based issue, caused by translation problems. No reason to switch into attack mode.

If you have installed mod_php you should not have, and should uninstall it.

mod_php is not installed at this server.

I’ve run “Config-Re-check” as @cyberndt suggested, … and in the feedback of this script it seems virtualmin recognize that php is installed as FPM,

but anyway, it’s not shown in Webmin > Tools > PHP-Configuration:

It was at one point according to your earlier post, hence the comments. It’s listed on the very first line of your Configuration Screen Shot.

@Gomez_Adams

If you look into your installation - I think - this entry should also be there?! (correct me if I’m wrong)

I guess, that this entry is a default pre-setting from webmin (no matter if mod_php is installed or not) to cover all common kind of php-config-files.

Because of this I wonder why there isn’t fpm in this list.

That’s why I’ve asked to add the fpm as pre-setting for Webmin to support it out of the box.

So there seems to be one bug at least:

  1. Either - the missing fpm pattern
  2. or the issue, that running “Re-Check Configuration” don’t add fpm here, even if it was found

@Joe can you give it a try, if that happens for you in same way as me, if you have an installation with more then one php-versions?

You’re wrong.

I only have one version of php on my Ubuntu 22.04 system: 8.1.2

If you Go To:
Webmin > Tools > PHP Configuration:

click on the module config in upper left corner.

You will see the following:

/etc/php*/cli/php.ini,/etc/php/*/cli/php.ini=Configuration for CLI
/etc/php*/fpm/php.ini,/etc/php/*/fpm/php.ini=Configuration for FPM
/etc/php*/cgi/php.ini,/etc/php/*/cgi/php.ini=Configuration for CGI
/etc/php*/apache2/php.ini,/etc/php/*/apache2/php.ini=Configuration for <tt>mod_php</tt>

What @suther is refering to is that the

/etc/php*/fpm/php.ini,/etc/php/*/fpm/php.ini=Configuration for FPM

is not listed on their PHP Configuration page.

None of this has anything to do with mod_php

1 Like

Yes, it does.

It is listed in his installed options. That means that it is installed. That is not good. It should not be.