I have a server "CentOS 7" managed by virtualmin, my web server PHP Version is 7.2.24, but the Command Line Interface (CLI) reading PHP Version => 5.4.16
I have tried several methods to change the CLI to 7.2.24, but all of them failed
Method 1 From virtualmin changed the server template as below (Mode was 'FCGId')
Methods 2
sudo update-alternatives --set php /usr/bin/php7.2.24
but all of the above failed after rebooting the server.
When installing PHP 7.x via RPM, there shouldn't be any PHP 5.x to begin with.
Just see which priority it has an give it a lower number:
update-alternatives --query php
update-alternatives --install /usr/bin/php7.2.24 php 10
One can also set it manually:
update-alternatives --config php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.