I am facing an issue about mismatch between last updated package of PHP and what is actually run.
Recently I have updated my Ubuntu server by running:
apt-get update && apt-get upgrade
On the output I have noticed the right package version was installed:
Unpacking php7.1-fpm (7.1.33-1+ubuntu18.04.1+deb.sury.org+1) over (PHP Version 7.1.25-1+ubuntu18.04.1+deb.sury.org+1) ...
I have controlled the installed version by running following command:
apt-cache madison php7.1-fpm
php7.1-fpm | 7.1.33-1+ubuntu18.04.1+deb.sury.org+1 | http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
But when I run phpinfo()
from php-fpm socket, I still see the previous installed version:
PHP Version 7.1.25-1+ubuntu18.04.1+deb.sury.org+1
What I have tried?
- To restart
php7.1-fpm
. - To restart Nginx (which is in top of PHP fpm).
EDIT 1
$ which php
/usr/bin/php
$ ls -al /usr/bin | grep php
php -> /etc/alternatives/php
php7.1
$ ls -al /etc/alternatives | grep php
php -> /usr/bin/php7.1
php.1.gz -> /usr/share/man/man1/php7.1.1.gz
$ /usr/bin/php7.1 -v
PHP 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Dec 7 2018 08:15:52) ( NTS )
EDIT 2
$ dpkg -l 'php*'|grep ^ii
ii php-common 2:69+ubuntu18.04.1+deb.sury.org+2+php7.3 all Common files for PHP packages
ii php-geoip 1.1.1-2+ubuntu18.04.1+deb.sury.org+10 amd64 GeoIP module for PHP
ii php-igbinary 3.0.1+2.0.8-1+ubuntu18.04.1+deb.sury.org+1 amd64 igbinary PHP serializer
ii php-memcached 3.1.3+2.2.0-1+ubuntu18.04.1+deb.sury.org+1 amd64 memcached extension module for PHP, uses libmemcached
ii php-msgpack 2.0.3+0.5.7-1+ubuntu18.04.1+deb.sury.org+1 amd64 PHP extension for interfacing with MessagePack
ii php-redis 5.0.2+4.3.0-2+ubuntu18.04.1+deb.sury.org+1 amd64 PHP extension for interfacing with Redis
ii php7.1 7.1.33-1+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.1-cli 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.1-common 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.1-curl 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php7.1-fpm 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.1-gd 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.1-gmp 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 GMP module for PHP
ii php7.1-intl 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP
ii php7.1-json 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.1-mbstring 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php7.1-mcrypt 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 libmcrypt module for PHP
ii php7.1-mysql 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.1-opcache 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.1-readline 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.1-sqlite3 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 SQLite3 module for PHP
ii php7.1-xml 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.1-zip 7.1.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 Zip module for PHP
which php
?php cli
which have the same original issue thanphp7.1-fpm
dpkg -l 'php*'|grep ^ii
?