简体   繁体   English

PHP版本Ubuntu 14.04 LTS中5.5和7.1之间发生冲突

[英]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.

相关问题 在Ubuntu 14.04上为PHP 7.1安装phpredis - Installing phpredis on Ubuntu 14.04 for PHP 7.1 hhvm性能类似于PHP 5.5 Ubuntu 14.04 - hhvm performance similar to PHP 5.5 Ubuntu 14.04 在 Ubuntu 14.04.2 LTS 和 php 7.1 上安装 php-imap - Install php-imap on Ubuntu 14.04.2 LTS with php 7.1 Ubuntu 14.04上的Apache 2.4.7不会通过PHP 5.5连接到MSSQL - Apache 2.4.7 on Ubuntu 14.04 will not connect to MSSQL through PHP 5.5 在Ubuntu 14.04上编译时,PHP 5.5 Zend OPcache无法运行 - PHP 5.5 Zend OPcache Not Running When Compiled on Ubuntu 14.04 在Ubuntu 14.04上选择php版本(php vs php5) - Choose php version on Ubuntu 14.04 (php vs php5) phpMyAdmin - 错误 | 缺少 mbstring 扩展名。 请检查您在 Ubuntu 14.04 LTS 中的 PHP 配置 - phpMyAdmin - Error | The mbstring extension is missing. Please check your PHP configuration in Ubuntu 14.04 LTS 部署到云端后,Google App Engine和PHP空白页。 (Ubuntu 14.04 LTS) - Google App Engine and PHP Blank Page after deploying to the cloud. (Ubuntu 14.04 LTS) 如何更改 Ubuntu 14.04 上的 php-cli 版本? - How can I change php-cli version on Ubuntu 14.04? 分段错误(核心转储)错误-CodeIgniter应用程序/ Ubuntu 14.04 / PHP 5.5 - Segmentation fault (core dumped) error - CodeIgniter application / Ubuntu 14.04 / PHP 5.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM