Aadii Mughal
Aadii Mughal

Reputation: 171

How to Change PHP Cli Version

I have Changed PHP Version 7.2 from cPanel however it's successfully changed. but when go to Putty (command line interface) and type

Php v-

it shows php version is 7.2 but Php-cli version 5.6

Php v-

PHP 5.6.40 (cli) (built: Apr 8 2019 15:39:30) Copyright (c) 1997-2016

The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend

Technologies

Upvotes: 0

Views: 1745

Answers (3)

ButcherFromHell
ButcherFromHell

Reputation: 165

My Case PLESK and CentoOS:

$ which php
/usr/bin/php
$ mv /usr/bin/php /usr/bin/php-backup
$ ln -s /opt/plesk/php/7.3/bin/php /usr/bin/php
$ php -v

to see which PHP are avaiable:

/usr/local/psa/admin/bin/php_handlers_control --list

Upvotes: 0

Aadii Mughal
Aadii Mughal

Reputation: 171

My case it was cPanel I had managed to fix by changing the PHP version.

Upvotes: 0

Slim Agent
Slim Agent

Reputation: 11

use the below command

update-alternatives --config PHP

Upvotes: 1

Related Questions