[CentOS] Changing command line version of php for apache

Sat Feb 13 22:42:52 UTC 2021
H <agents at meddatainc.com>

On 02/13/2021 05:05 PM, Leon Fauster via CentOS wrote:
> Am 13.02.21 um 21:59 schrieb H:
>> I have updated php on a Centos 7 system to use php 7.2 from sclo. Apache running on the system is also using php 7.2 as shown by phpinfo(), however, apache continues to use the default version of php, ie 5.4.16, when that user launches a process from the command line. All other users default to php 7.2 when running from the command line which is correct. For some reason I have missed configuring apache php-cli correctly.
>>
>> I have googled and found many examples on how to change the configuration settings so that apache uses php 7.2 when serving web pages but in this case it is php-cli that needs to be corrected to use a later version.
>>
>> What should I check? What have I missed? By the way, I am not planning to remove php 5.4 from the system since it might be needed for something at a later time.
>>
>
>
> Check SCL docs:
>
> https://access.redhat.com/documentation/en-us/red_hat_software_collections/3/html/packaging_guide/sect-enabling_the_software_collection#sect-Running_an_Application_Directly
>
>
> CLI:
>
> scl enable rh-php72 yourcmd
>
>
> -- 
> Leon
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

But apache does not have a shell where I issue that command? And, a change needs to survive a reboot.