I have a fresh VPS with Ubuntu 12.04, on which I installed Virtualmin (with the install script).
I also have upgrading Ubuntu source repositories, to install php 5.4.11.
I have re-check webmin configuration and everything is fine.
When I try to access to a page, on a virtual server configurer with cgi or fcgi, my browser ask me to download the php file (even after clearing my browser’s cache).
They were not commented, after upgrading to php 5.4.x I guess.
But I got the warning when I re-checked the config, so I commented those lines.
No more problems are shown by the “Re-Check Config”.
I was researching and investigating for hours and was about to do a major rollback when I found your post.
On Ubuntu 10.04 I had updated PHP to 5.4.13 and then experienced the very same symptoms that you’ve described.
Disabling php5_cgi finally did the trick!
Actually php5_cgi.conf also includes that SetHandler application/x-httpd-php line which needs to be commented out.
Obviously the new php install had enabled this module by default.
Yeah, that option may not exist in Webmin on CentOS… but that just means you’d need to manually edit your Apache config, and comment out the line that’s loading the module you no longer want.
I just like to add something for those that are experiencing the same thing.
I have upgraded to PHP 5.4 and MySQL 5.5 on my CentOS 6.4 (I know this isn’t recommended but I needed to test if MySQL 5.5 had performance advantage over 5.1)
After that php files started to download on the browser instead of executing.
In my case this was fixed by editing this file
/etc/httpd/conf.d/php.conf
I changed this line:
SetHandler application/x-httpd-php
into this:
SetHandler application/x-httpd-php5
Then restart Apache.
Also, isn’t “Configure Apache Modules” similar to “Re-configure Known Modules”?
If so, you can click “Module Config” on Apache page then set Always detect Apache modules automatically? to “No” so that the extra option appears.
The “Servers -> Apache Webserver” – Click on “Global Configuration” – “Configure Apache Modules”. – uncheck the module and save. (rebooted, just in case) solved my problem trying to install Drupal 8 (beta4). Now the server executes the php files instead of trying to download them.