1

I have recently updated by php. My php -v command show following result:

PHP 7.0.6-6+donate.sury.org~precise+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

But still phpinfo() function shows php 5.3.10 version

What should I do to start using it.

1 Answers1

1

You need to install SAPI for your webserver, f.e. either libapache2-mod-php for Apache2 or php-fpm for NGINX. CLI version of PHP could be different from web SAPI.

For Ubuntu 12.04 LTS you need to also add ppa:ondrej/apache2 if you intend to use Apache 2.x PHP module:

sudo add-apt-repository ppa:ondrej/apache2
sudo apt-get update
sudo apt-get install libapache2-mod-php

If you had apache2 2.2.x installed previously, you need to remove it with:

apt-get purge 'apache2*'

This will remove all apache2 configuration files, so don't forget to backup your configuration (if you made any changes).

oerdnj
  • 7,940