简体   繁体   中英

PHP version Conflict between 5.5 and 7.1 in ubuntu 14.04 LTS

When I want to know my php version by terminal using

#php -v

I am getting

PHP 7.1.4-1+deb.sury.org~trusty+1 (cli) (built: Apr 11 2017 22:45:20) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.4-1+deb.sury.org~trusty+1, 
Copyright (c) 1999-2017, by Zend Technologies

But when I am trying to run info.php written with php code

<?php phpinfo(); ?>

O/P

PHP Version 5.5.9-1ubuntu4.21

Please let me clear what is happening exactly with my php version. I installed the full LAMP on my system freshly after un-install APACHE2, PHP & My-Sql.

Also, I recommend check Loaded Configuration File item at phpinfo() output.

Here I got /etc/php/7.0/apache2/php.ini using Ubuntu 16.04 LTS and PHP 7.0.15 with Apache.

Then at the terminal, run php --ini and check the same item Loaded Configuration File: to see if got any difference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM