0
votes

today I changed from php7.2 to 7.0 for testing. Then I tried to change back to 7.2 and php -v outputs

PHP 7.2.6-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 11 2018 14:59:25) ( NTS ) Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.6-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

and phpinfo(); outputs

1
It seems like phpinfo and your question didn't get submitted.Zev
did you restart apache after switching your PHP version?Ramy Nasr
@RamyNasr I use nginx, and yes, i restarted itBeaast_exe
Your command line and HTTP server are using different versions of PHP, ie you have multiple versions installedPhil
@Phill I'm gonna reinstall the VPSBeaast_exe

1 Answers

0
votes

If you run php -v this print the version of php-cli.

If run phpinfo(); into a php file, you print the version of php-fpm.

php-fpm is used by your web server(nginx, apache) to process the .php, while php-cli is used for console commands.