When I installed phpmyadmin in Ubuntu 16.04 LTS, it gives me an error mentioned below.

The mbstring extension is missing. Please check your PHP configuration

then I tried to install php-mbstring, it says mbstring is up to date, Can anyone help me to solve this?


  • If you're using php-fpm as well, don't forget to restart that too after installing mbstring > systemctl restart php-fpm
    – Alex Jolig
    Nov 6, 2018 at 9:30

3 Answers 3


Please type in terminal:

sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0

Then, restart apache2:

sudo systemctl restart apache2

Still missing?

You need to explicitly enable the PHP mcrypt and mbstring extensions, which can do by typing:

sudo phpenmod mcrypt
sudo phpenmod mbstring

Then, restart apache2:

sudo systemctl restart apache2

This has been reported here: PHPMyAdmin requires mbstring

  • I did it, but terminal says mbstring is up to date. anything else to do ? May 15, 2016 at 6:25
  • 1
    I did this, "sudo phpenmod mcrypt" sudo phpenmod mbstring And Restart apache2 sudo systemctl restart apache2, But mbstring is still missing May 15, 2016 at 14:23
  • any other solution ? May 15, 2016 at 14:59

If you want to use php 5.6 instead of php 7

Install php 5.6 mbstring package:

sudo apt-get install php5.6-mbstring

Then add the following line to the bottom of your php.ini file:


Restart apache:

sudo service apache2 restart

To find your php.ini file, create a file and insert the following line:

<?php phpinfo(); ?>

Then open with a browser to see where your php.ini file is located.


In my case, I finally found out that the PHP version that used by phpmyadmin is php5.6 (I have installed php7.0). I found this by executing phpinfo() in test.php then I had done this to make phpmyadmin work:

  1. By using synaptic package manager, install php5.6,php5.6-mysql,php5.6-mbstring and php5.6-mcrypt
  2. Make sure that extension=mbstring and extension=php_mysqli on /etc/php/5.6/apache2/php.ini is not commented
  3. Finally, restart your apache sudo systemctl restart apache2

I still new at these but hope this works for you.

  • 1
    This requires a PPA to work - PHP 5.x does not exist in the Xenial repositories.
    – Thomas Ward
    Nov 2, 2016 at 16:44
  • This had no upvotes but it worked for me.
    – hytromo
    Jan 12, 2017 at 11:36
  • To add to @ThomasWard's comment, a PPA is a personal package archive - in this case one which contains the old PHP 5.6 packages. The command that you want is sudo add-apt-repository ppa:ondrej/php before sudo apt-get install php5.6-mbstring will work on Ubuntu 18.4
    – meesern
    Jun 6, 2019 at 12:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.