1

I am sucessfully running 7.0 and would like to upgrade to 7.1.

So far I've done the following,

sudo service apache2 stop
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php7.1 php7.1-common
sudo a2enmod php7.1
sudo service apache2 start

Now, php -v gives me 7.1.1 but phpinfo() is saying 7.0.15

What am I missing, is there a config file I need to change somewhere?

Thanks for any help!

Steve
  • 111
  • 1
  • 3

3 Answers3

3

This might be also that you have installed your php7.1 but the php7.0 mod is still enabled.

In the cli if you run php -v you have the correct version 7.1 but in the phpinfo() you will see php7.0. Disable php 7.0 with sudo a2dismod php7.0 and you will have 7.1 working properly.

Herr Nentu'
  • 131
  • 4
0

In case anyone finds this...

I've since done,

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get dist-upgrade
sudo reboot

Seemed to do the trick.

I had to install some modules which were missing from the new version but other than that, all good.

Steve
  • 111
  • 1
  • 3
  • Was phpfpm involved? I smell a long-running php process that wasn't restarted after the upgrade. – Dylan Martin Jan 25 '17 at 23:36
  • 1
    @DylanMartin The problem was that Steve wrote "apt-get install php7.1" when that is not a package. Just installing php7.0 will install the newest version avaible – Orphans Jan 26 '17 at 07:26
  • 2
    php7.1 is definitely a package, I installed it. See [here](https://launchpad.net/ubuntu/+source/php7.1), or [here](https://launchpad.net/~ondrej/+archive/ubuntu/php) – Steve Jan 26 '17 at 13:23
  • phpfpm wasn't invloved as far as I know, not sure what was going on. All I know is it works now. – Steve Jan 26 '17 at 13:25
  • @Steve Oh, I thought about php7.0.12. Thanks for making it clear to me – Orphans Jan 27 '17 at 08:23
0

You might have to change path to your new php in your sites-available or apache config. For nginx I have following:

...
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;                     
...
Pav K.
  • 107
  • 6