Re: Wrong version of php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 23.06.20 um 17:35 schrieb H:
On 06/23/2020 05:23 AM, Leon Fauster via CentOS wrote:
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



_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos

I have that already but that only applies to new terminal sessions. The current issue is that systemd does not seem to pick up a global configuration of using php72 rather than the default php54.

See https://access.redhat.com/solutions/527703


I do not known what exactly you are trying but
for scripts you could pass the php binary with
full path or use a shebang like

#!/opt/rh/rh-php72/root/usr/bin/php

--
Leon

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux