2

firstly, i've installed php5 on my system, and i want to upgrade to php7.1 and and then I download the source code from the official website, and I install it.

The installation process was success, when I checked with php -v, it displayed php7.1 But when I check with phpinfo(), it's still displays the oldest php version

how can it happen where there are two different php versions but not stack each other PHP Version 5.5.9-1ubuntu4.22

Now, the problem is how to use the latest php7.1 on my localhost

thanks beforely, i'm sorry if my questions is unexplicit

Pang
  • 9,564
  • 146
  • 81
  • 122

2 Answers2

0

This is essentially a duplicate of this question which I answered earlier this week. See the accepted solution which will fix your problem.

PHP Parse error: syntax error, unexpected '?' in helpers.php 233

I also recommend just upgrading to Ubuntu 16.04 or 17.10 and using the main supported version instead of a PPA. Just my two cents.

roktechie
  • 1,345
  • 1
  • 10
  • 15
  • I've upgraded it before, but my laptop runs very laggy :D , so i did downgrade my OS to Ubuntu 14.04. – naufalhfzhn Sep 15 '17 at 05:54
  • sorry sir, is there a any fault when i'm installing php7 ? should i purge the php5-common ? – naufalhfzhn Sep 15 '17 at 05:59
  • sudo apt-get remove php5-common then sudo apt-get autoremove. If you have trouble with performance under 16.04 try installing the hwe kernel. – roktechie Sep 15 '17 at 12:40
0

If you didn't install libapache2-mod-php7.1 yet, install it.

then deactivate the older php module:

sudo a2dismod php5 

and activate the new module php7.1 in apache:

sudo a2enmod php7.1

And finally restart apache2:

sudo service apache2 restart
Fetrarij
  • 7,176
  • 3
  • 27
  • 35
  • yaay , finally it's changed, but when i try to open phpmyadmin, it's going error, – naufalhfzhn Sep 15 '17 at 06:12
  • yaay , finally it's changed, but when i try to open phpmyadmin, it's going to error, the message is "phpMyAdmin - Error The mbstring extension is missing. Please check your PHP configuration." what caused it? – naufalhfzhn Sep 15 '17 at 06:18
  • now, the message is "mysqli extension is missing " i've search on my php.ini and check it maybe mysqli extension to be commented out or not, but i didn't found anything , should i install mysqli extension again? – naufalhfzhn Sep 15 '17 at 06:37
  • oh it's solved, i install it again and fixed!!, thanks a lot bro :D !!! – naufalhfzhn Sep 15 '17 at 06:42