A
A
Alexander2016-07-03 16:12:54
PHP
Alexander, 2016-07-03 16:12:54

Why are different php versions shown in phpinfo() and through php -v?

Good afternoon everyone!
Installed VestaCP using the config:

bash vst-install.sh --nginx yes --phpfpm yes --apache no --vsftpd no --proftpd yes --exim yes --dovecot yes --spamassassin yes --clamav yes --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota no --hostname ---.ru --email [email protected] --password ---

Updated php in VestaCP to the seventh version according to the manual:
www.servermom.org/upgrade-vestacp-to-php-7-centos/2974
Everything went smoothly and without errors, only when you check the version via phpinfo()
it shows the old version (5.4 .45),
if I recognize php -v through the terminal, then the seven :)
fe5ab74773ed4498a4893c3b8d454562.png
Why is that?
Whom to believe and how to put in order so that everything is identical everywhere?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2016-07-03
@inwebwetrust

In short, I decided to take advantage of CentOS. Maybe someone will need instructions for upgrading to PHP7 on VestaCP for CentOS 7
Installed the panel, then follow this instruction:
https://webtatic.com/packages/php70/
added a couple of repositories and in two lines of code:

yum install yum-plugin-replace
 
yum replace php-common --replace-with=php70w-common

updated php to the seventh version.
phpinfo() and php -v now give the same information!
Happiness! =)

V
Vitaly, 2016-07-03
@vshvydky

I would believe both, 1 version is called through the console, another one is connected in the server config.

Z
zooks, 2016-07-03
@zooks

The first step is to uninstall old versions of PHP.
Also don't forget to restart Apache or php-fpm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question