[CentOS] Wrong version of php

Tue Jun 23 09:23:59 UTC 2020
Leon Fauster <leonfauster at googlemail.com>

Am 22.06.20 um 22:27 schrieb H:
> It's been a while since I updated to php72 on this machine and there is some setting I must have forgotten. Apache, root and a user automatically get php72 when I run php in a terminal window, however, a php script picks up the wrong version of php, ie php54 and the version of php in /usr/bin/php is indeed version 5.4.
> 
> I have googled without finding the answer but how do I make sure /all/ processes use php72 rather than the default 54 in CentOS 7? Surely there must be a better way than overwriting /usr/bin/php. What have I forgotten to do?
> 
> Thank you.


If you want it in the terminal with php72 then switch to that context 
with (temporarily for this session):

scl enable rh-php72 bash


if I am syntactically wrong about the collection name check it with

scl --list


--
Leon