CentOS installed php72 but command line php isn not working

Please read the Wizard instructions

If you need a single version, using remi-php72 repository, and the php-* packages, the command will be php.

# yum-config-manager --enable remi-php72
# yum update
# yum install php-cli
# php -v

If you need multiples versions, the php72-php-* packages are available, and the command is php72 or

# yum install php72-php-cli
# php72 -v
# scl enable php72 bash
# php -v

So, according to your question, you have enable the remi-php72 repository, but installed the php72* packages from the remi-safe repository...


I am not sure what is the cause but this is what you can do

whereis php72

It will give the path. Something like:

php: /usr/bin/php72

Then you can do:

ln -s /usr/bin/php72 /usr/bin/php

Tags:

Linux

Php

Centos