After updating PHP on my Ubuntu server my phpinfo()
continues to show the previous version 5.5
even when I run php -v
(returns version 7.0).
I've tried restarting apache and php7.0-fpm
and it did not work.
After updating PHP on my Ubuntu server my phpinfo()
continues to show the previous version 5.5
even when I run php -v
(returns version 7.0).
I've tried restarting apache and php7.0-fpm
and it did not work.
First of all, after the PPA update, PHP is being installed as multiple versions. In my case, I have installed PHP 5.6 and PHP 7.0.
You probably installed new PHP, but did not enable PHP 7.0
in Apache.
You can try doing this:
sudo a2dismod php5.6
sudo a2enmod php7.0
Note that it is necessary to run a2dismod
to disable disabling the module with the previous version, and a2enmod
to enable the 7
version.
After making these changes, restart Apache.