0

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

3
  • Try to restart apache so your changes applied Commented Apr 20, 2019 at 12:55
  • Apache has nothing at all to do with using PHP from the command line. Commented Apr 20, 2019 at 13:15
  • no worked. but i asked to support they did in a minutes without restarting the server. Commented Apr 23, 2019 at 10:18

3 Answers 3

1

use the below command

update-alternatives --config PHP

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

0

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 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.