Ok, after an AWS upgrade, my PHP version abruptly changed from 7.1.8. to 5.4.16. Previously I was using 7.1.8.

To chg back the PHP version to 7.1.8, i tried this. Under Virtualmin -> Server Configurations -> PHP Versions, it says, "This virtual server is using the mod_php or FPM execution mode for PHP, such does not allow per-directory version selection".

So i went to Virtualmin -> System Settings -> Server Templates -> Default -> PHP Options, and selected "Highest Available" but still the PHP version is 5.4.16 (shown my phpinfo output) after Apache restart. Although i have 7.0.27, and 7.1.8. Previously I was using 7.1.8.

How do I fix this?

enter image description here


If you installed Virtualmin i.e. on CentOS, it installs the PHP version from an official repo. The packs have a "u" at the end. Like php70u

My guess is you installed the higher php version from the Remi repo.

I know this because I rendered my server obsolete trying to upgrade my php.

If I'm right, installing a higher "u"-version (they're like 1 edition behind) will solve your problem or completely uninstalling php* and then reinstalling.

I had trouble with delete/reinstall.

You should find out which modules are installed exactly so that you can install them in one batch before you remove because for some reason (I'm not a technical person) php-soap or I think it was php-xml too will give you problems if you add them later.

In any way, delete the repo the old version is pulled from or it will keep re-installing it and mess up your server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.