It would help avoid confusion if Virtualmin → Server Configuration → PHP Versions could be moved to and consolidated with Virtualmin → Server Configuration → Website Options: PHP script execution mode such that users would see option buttons for…
FCGId 5.4 (run as virtual server owner)
FCGId 7.0 (run as virtual server owner)
FPM 7.0 (run as virtual server owner)
FCGId 7.3 (run as virtual server owner)
FPM 7.3 (run as virtual server owner)
… on a system in which PHP 5.4 is installed without FPM and 7.0 and 7.3 are installed with FPM.
PHP configuration is absolute chaos, and is spread across several pages in the UI, making it far more confusing and time-consuming than it should be. I’ve talked about it with @Ilia and @Jamie in the past, we just haven’t come to a consensus about how to consolidate without limiting functionality (some things apply to per-domain configs, some things apply to system-wide decisions, and some things have security or compatibility considerations…“PHP” is a lot of problems to be solved in a lot of areas in the system). But, it does need to happen. It’s definitely a big source if friction.
We could certainly consolidate PHP Versions and Website Options onto a single “PHP” page. And make the common case where only a single version is used for the domain easier, as likely not many people select different per-directory versions.
Yeah, that’s what I was thinking too. Split out all the PHP settings from the Website Options page to a new “PHP Options” page, which will also include the version.
It’s hard to think of a sensible case, but there are senseless cases out there.
One example I’m familiar with was a guy who ran a billing system on his site that required PHP 7-point-something, but the rest of the site wouldn’t work right with anything more than PHP five-point-something. As I recall there was a lot of mysql -> mysqli rewriting needed, as well, which I did for him.
I agree that it’s an unusual case. But it’s by no means unheard of. Ideally, it would be solved by making the changes needed to make the “old” part of the site run on the newer PHP. But especially in the shared hosting world, things are seldom ideal.