Update for PHP 7 ubuntu

5

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.

    
asked by anonymous 06.12.2016 / 18:49

1 answer

5

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.

    
06.12.2016 / 19:12