29.1 C
Monday, October 2, 2023
HomeLinuxsolve phpinfo() shows version 5.5.9 but in cli php -v shows version...

solve phpinfo() shows version 5.5.9 but in cli php -v shows version 7.1

solve phpinfo() shows version 5.5.9 but in cli php -v shows version 7.1

While after upgrading PHP 5.5.9 version to PHP 7.1  following this url


I stuck in to another error like in terminal php -v showing php 7.1 but in phpinfo()

it shows version 5.5.9. and the project did not run with this error as it was missing php 7 modules.

Then to change php version in phpinfo(). I tried to to disable php5.5

on terminal execute
$ sudo a2dismod php5.5
Now you should enable PHP7 ones:
$ sudo a2enmod php7.1

if this is gving error like
$ sudo a2enmod php7
ERROR: Module php7 does not exist!

then install
$ sudo apt-get install libapache2-mod-php7
now try

$ sudo a2enmod php7.1

now you can see the phpinfo page has changed and showing 7.1 instead of 5.5.9 … hurrah … 🙂
but phpmyadmin throwing this error

The mbstring extension is missing. Please check your PHP configuration. see image – 1

mbstring , phpmyadmin

Please follow below commands to solve this error in phpmyadmin.

$ sudo apt-get install php7.1-mbstring
then you can activate it
$ sudo phpenmod mbstring

after that I stuck here getting this error

The mysqli extension is missing. Please check your PHP configuration.
Add the extension in php.ini file located in /etc/php/7.1/apache2/php.ini
save and exit then install below commands.
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install php7.1-mysql

After that I restart my server by using the command

$ sudo service apache2 restart

Now everything seems fine and working…

also to upgrade mysql version from 5.5 to 5.7

$ wget http://dev.mysql.com/get/mysql-apt-config_0.8.0-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.0-1_all.deb
$ sudo apt-get update
$ sudo apt-get install mysql-server

now log in to localhost/phpmyadmin and you will see Mysql version 5.7

You might also like :To take backup and restore Mozilla Thunderbird mail client (Windows/Ubuntu/Mac)

Durga Charan Ojhahttps://lifeonnetwork.com/
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.


Please enter your comment!
Please enter your name here

Most Popular