[英]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版本时
#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代码编写的info.php时
<?php phpinfo(); ?>
O/P O / P
PHP Version 5.5.9-1ubuntu4.21
Please let me clear what is happening exactly with my php version. 请让我清除一下我的php版本到底发生了什么。 I installed the full LAMP on my system freshly after un-install APACHE2, PHP & My-Sql.
卸载APACHE2,PHP和My-Sql之后,我刚在系统上安装了完整的LAMP。
Also, I recommend check Loaded Configuration File item at phpinfo()
output. 另外,我建议在
phpinfo()
输出中检查Loaded Configuration File项目。
Here I got /etc/php/7.0/apache2/php.ini
using Ubuntu 16.04 LTS and PHP 7.0.15 with Apache. 在这里,我使用Ubuntu 16.04 LTS和带有Apache的PHP 7.0.15来获得
/etc/php/7.0/apache2/php.ini
。
Then at the terminal, run php --ini
and check the same item Loaded Configuration File: to see if got any difference. 然后在终端上,运行
php --ini
并检查相同的项目Loaded Configuration File:以查看是否有任何区别。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.