Changing the "PHP script execution mode " switched PHP versions

After https://www.virtualmin.com/node/38148 was resolved, I started to experiment with "two PHP on one OS" setup and today happen on a major issue.

If a website was initially installed using a template which was configured to run in PHP 5.5 and FCGId, but later was switched to "Apache mod_php" then PHP automatically switches back to 5.4.16. So you have to go to "PHP Versions" and manually fix it back to 5.5.

I think this is really bad design issue as PHP version should stick whatever other options you change for the website.

Status: 
Closed (fixed)

Comments

Howdy -- I believe that's a limitation with how the system works... to my knowledge it's not possible to have more than one version of mod_php installed at a time, as it requires an Apache module.

The multiple PHP versions should only work with FCGID or CGI.

So if a website is using PHP 5.5, it would indeed revert to 5.4 if mod_php is selected.

I see. But then it would be nice somehow inform Virtualmin users about this restriction.

Ideally the "PHP script execution mode" should be completely hidden in case if two PHP versions are installed in the system. However, I know from discussing other interface related issues, that Jamie is really reluctant to change fields.

So maybe if hiding that option conditionally is not possible, then maybe some kind of warning notice should be somewhere to save Virtualmin users from frustration - it took me quite a while to figure out why the website was not working without outputting errors to any logs until I almost accidecanlly decided to check PHP version.

Actually, this isn't a totally unreasonable request - if you switch to mod_php and then back to fcgid, the original PHP version should be preserved.

Actually, this isn't a totally unreasonable request - if you switch to mod_php and then back to fcgid, the original PHP version should be preserved.

Thanks Jamie, so does your response mean this will be addressed?

It's on our todo list.

This has been implemented, for inclusion in Virtualmin 5.0.

Automatically closed -- issue fixed for 2 weeks with no activity.

Automatically closed -- issue fixed for 2 weeks with no activity.