[CentOS] Wrong version of php

Mon Jun 22 21:30:30 UTC 2020
H <agents at meddatainc.com>

On 06/22/2020 05:21 PM, Pete Biggs wrote:
>> 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?
>>
> You can't/shouldn't do that.  The point of the Enterprise OS is that
> versions are consistent throughout the lifetime of the OS, so packages
> don't change the default versions because things may break because
> something is expecting PHP 5.4 and not 7.2.
>
> If you have an application that needs PHP 7.2, then change the way it
> is invoked so it runs using 'php72' instead of just 'php'.
>
> Now, in all honesty I suspect that changing the default version of PHP
> isn't going to break many things at the system level; at least not in
> the same way as it would if you changed the default python to python3.
> But it is something that may save you problems in the future.
>
> P.
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

My thought exactly, however, I believe I made at least some of the changes required for new terminal sessions to use php72 rather than the default php54 but for some reason this script uses php54.

The script starts:

#!/usr/bin/env php

I know I can always change this to use the already installed php72 but there must be some other change I forgot to make on my system??