I’m currently running Virtualmin on a dedicated server running CentOS 7.9 and have had a strange issue over the last couple of days so I turned to the Virtualmin forums to see if anyone could be of any assistance. Over the last 2 days php stopped executing .php files and instead started downloading them in my web browsers, this never happened in the 1.5 years of using virtualmin so it caught me off guard and did some digging to see if this had happened to anyone else.
I found some threads on various forums including virtualmin mostly pointing out that I should check my apache config httpd.conf for a specific line php_admin_value engine Off and comment it out or change my script execution mode from what is it by default FCGId to something like **FPM ** (Which does work but I’d rather find a better solution).
My question really is that I’ve never had to-do any of this before and it seems like an update in virtualmin or php has caused this kind of bug, my steps to reproducing it are quite simple since I’ve been reinstalling virtualmin and centos on VPS machines to see if I can continue getting the same problem.
- Get a VPS running centos 7
- Update yum
- Install virtualmin and configure
- Add a domain
- Update the pre-installed php-5 to something newer like 7.4 or 8.0 with some extensions like intl, zip
- Make a random .php file with anything in it.
- Access that domain and php file like (https://domain.com/hello.php)
- Downloads to my browser