B
B
Bobur Bakhritdinov2017-06-15 08:22:44
linux
Bobur Bakhritdinov, 2017-06-15 08:22:44

Ubuntu 14.04 server update PHP version?

Hello.
An incomprehensible error appeared
Updated the PHP version from 5.6 to 7.0
There is a bunch of nginx + apache2
in the console I type php -v


PHP 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jun 14 2017 05:55:23) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3. 0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.20-2~ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies

And disable php5 module and enable php7.0
sudo a2dismod php5.6
sudo a2enmod php7.0
sudo service apache2 restart

Also:
sudo update-alternatives --set php /usr/bin/php7.0
After restarting apache, php stopped working, it only works when I switch back to php5.
Maybe I made a mistake somewhere?
Thanks in advance for your reply!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Puma Thailand, 2017-06-15
@opium

make an update to 16.04 there is seven by default

N
Nikita Belov, 2017-06-15
@NikitaRain

As far as I remember, you need to add the desired repository. And it is better to put the latest version of the server.

R
Roma, 2017-06-15
@aaallllsss

if you need php 7, then it's better to install 16.04 right away

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question