I discovered today that on all websites on my Debian 11 and Debian 12 Virtualmin boxes when navigating to: Virtualmin > Web Configuration > PHP Options
an indication of a PHP-FPM configuration error as shown in this screenshot:
We have been keeping up on updates only through the Virtualmin panel.
Whatever change happened turned off the PHP logging on all the sites as well as set the PHP to 8.1 which we had set as the default for newly created sites on the boxes.
I do not know precisely when this occurred but do know by checking various sites’ PHP logs on the servers that many were still logging various expected PHP warnings and errors as of late yesterday (Eastern time).
In trying to understand how this happened, I believe it is from my own doing.
I changed the initial setting a short time ago of the box’s default PHP to 8.1 believing that would be a good starting point for PHP driven sites (like WordPress and Joomla to name a couple CMSs).
I had recently discovered numerous errors in PHP sites using various plugins. Everything appeared to work with PHP 7.4 unfortunately, as the reality is that every plugin and theme and even the CMS cores are not compliant with the latest versions of PHP.
What I failed to realize is that apparently the template change I made might change the PHP version in all the websites currently on the servers, which generated the error page I initially showed above.
That said, I used the Virtualmin panel to reset the error logging to “on” and where it initially was set up to (in the sites’ log folder) and reset the PHP version to 7.4 where needed. Luckily it was relatively quick in that I was able to navigate to the first site in the pulldown to its Web Configuration > PHP Options, make the change, save it, and simply choose the next site and work my way through the list.
My concern now is if I change the default PHP again, that it will re-create the same issue.
Would I be better off making the change (of the default PHP setting for what I thought would be for new sites) at the console and then restarting webmin or would that restart re-create the issue?
I discovered that although the PHP settings page indicates the site is using PHP 8.1 (as I set when I initially changed the template page), it is in fact using the original PHP I had prior to the template page setting.
I discovered this by checking a WordPress site’s Site Health and viewing which PHP WordPress reported the site was using.
I can only guess at what is happening now when the template page setting is changed.
Thanks, Joe. I am away right now so I can’t throw a box together to try to duplicate the situation. From what I can see so far, it appeared that when I updated the box’s PHP setting server template page, there was a disconnect between the saved setting, each site’s PHP setting page, and the website itself.
My thought is that one should be able to change the server template without its affecting all sites (unless there is an option indicating one specifically wants to do that).