47

Whenever I try to enter my phpMyAdmin, it gives me this error:

The mbstring extension is missing. Please check your PHP configuration.

I've looked all over the Internet for a fix, but all I've found is errors similar to mine, but not the same, or the exact same but there was no fix given.

I am also using Windows.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
user1930852
  • 571
  • 1
  • 4
  • 4
  • possible duplicate of [Missing mbstring PHP extension when installing phpMyAdmin on Mac](http://stackoverflow.com/questions/4787403/missing-mbstring-php-extension-when-installing-phpmyadmin-on-mac) – karthikr Sep 03 '13 at 18:48
  • Really? No. The solution given on the Mac question was to install it with a Mac command, sudo port install php5-mbstring. I can't do that on windows. – user1930852 Sep 03 '13 at 18:51
  • Are you running windows? How did you install PHP? There are some bundles, like Wamp server that allows you to toggle which extensions will be enabled and available for your apps. – Leprosy Sep 03 '13 at 18:52
  • http://www.abyssunderground.co.uk/ – user1930852 Sep 03 '13 at 18:53
  • I use Abyss webserver to run my website, i used PHP5 from that website i just sent. – user1930852 Sep 03 '13 at 18:54
  • I have PHP5, MySQL and PhpMyAdmin. That's it. Is there a way to fix the error? – user1930852 Sep 03 '13 at 18:58
  • You are using a very old server software that should get updated. Which version of PHP are you using? If the version is below 5.3, you are asking for trouble. – Sven Sep 03 '13 at 19:00
  • I'm using PHP 5.2.0, but i got the SAME error with 5.5.3. – user1930852 Sep 03 '13 at 19:02
  • Ubuntu php7 apt users `apt-get install php7.0-mbstring`. Don't forget to restart Apache. `systemctl restart apache2`. `php-mbstring` also works – Peter Chaula May 29 '17 at 09:35

31 Answers31

30

In Centos I have installed a php extension. I did this with:

yum install php-mbstring
veelen
  • 1,916
  • 19
  • 26
Arjang
  • 731
  • 1
  • 10
  • 19
26

Before sometime I also had the same problem. I have tried replacing the .dll file but no result. After some debugging I found the solution.

I had this in my php.ini file:

extension_dir = "ext"

And I'm getting mbstring extension missing error. So I tried putting the full path for the extension directory and it works for me. like:

extension_dir = "C:\php\ext"

Hope this will help.

Cheers,

Gautam Arya
  • 723
  • 14
  • 40
  • 1
    Thank you for your answer. This was the only way it worked for me too – sabah Oct 16 '13 at 13:10
  • Setting absolute path to PHP extension directory will always work, but to be a little more portable this also worked for me: `..\php\ext` - in XAMPP 5.6 – jave.web Sep 21 '15 at 18:22
15

check your php.ini file in the root directory of your php installation. In the extensions part of the configuration you should find:

;extension=php_mbstring.dll

remove the leading ';' to uncomment and enable the extension so it looks like this:

extension=php_mbstring.dll

restart your apache and it should work.

Edit: I just read that you are already using a webhost. Does your webhost have a interface where you can set php variables etc? Or a .ini file you can edit?

If not you may are forced to talk to the webhost and ask them to enable that particular extension.

cptnk
  • 2,430
  • 18
  • 29
  • I could be mistaken but I am pretty sure you have to restart the apache. Do you have a possibility to access the server via ssh? If so you have to restart it "# /etc/init.d/apache2 restart". – cptnk Sep 03 '13 at 19:03
  • Oh i just found out why it's not working. There's no mbstring.dll in my folder. Do i need to download it? I can't find anywhere to get it. – user1930852 Sep 03 '13 at 19:05
  • It should be located within the \ext\ directory. And yes you'll need to get that. Usually you'll need to compile php or download it compiled already. I doubt just adding the dll would solve the problem but one can try. http://www.file-upload.net/download-8040628/php_mbstring.dll.html I hope I am not breaking any copyright here if so pls inform me and I remove this download link. If adding the dll does not help you definetly should use http://windows.php.net/download/ to download your php. – cptnk Sep 03 '13 at 19:09
  • I've got the file, sorry for the late answer, i got school and homework. I got the file, but i still get the error. There must be something wrong, but i can't figure out what.. – user1930852 Sep 04 '13 at 14:20
10

My case was like this

Strangely, I noticed that the php.ini file that WAMP was using wasn't the one in the php directory, but rather was referencing a php.ini file in the bin directory... I copied my php.ini file to wamp\bin\apache\apache2.4.17\bin directory, restarted the wamp services and PHPMyadmin was off and running...

Thanks I solved the problem

user2651478
  • 101
  • 1
  • 2
10

In Ubuntu Server I have installed a php extension. I did this with:

sudo apt-get install php-mbstring
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
  • 1
    I had php5. Updated php5 to php7 after that, this error displayed. I ran this command and problem gone. ubuntu 14.04 – Ali Aug 06 '16 at 16:43
  • As @Ali suggests, this is needed after upgrading to PHP 7 since mbstring extension for PHP 7 is in a different package (such as "php7.1-mbstring" for PHP 7.1). – MÇT May 13 '17 at 09:53
9

Another reason for this problem is Php version. When I changed the running PHP version to 7.0.0, problem has gone.

enter image description here

Fatih Çelik
  • 401
  • 7
  • 16
  • Excellent! Thank you Fatih. – Steve Jun 07 '16 at 06:56
  • Worked like a charm, thanks! I should mention that I also changed the path to the ext folder to: extension_dir = "C:/wamp64/bin/php/php7.0.0/ext/" Just make sure this corresponds to the path in your WAMP installation. – Liran H Jun 26 '16 at 20:34
  • I'll add too that when I changed the PHP version back to the version where the ini was broken, it was now fixed. Weird. – Nick Pickering Jul 31 '16 at 02:14
  • Path for the extension was right. Still I got the error. Then, I have changed the version and the problem is gone! Thanks @Fatih Çelik – user1896653 Sep 05 '16 at 05:37
4

Ubuntu 15.10

1) sudo nano /etc/php/7.0/apache2/php.ini

uncommited extension=php_mbstring.dll

2) sudo apt-get install php7.0-mbstring

3) restart apache2

4
  1. install mbstring and restart your apache:

    sudo apt-get install php-mbstring
    sudo service apache restart
    

then remove ; from your php.ini file:

;extension=php_mbstring.dll

to

extension=php_mbstring.dll

If it still doesn't work..remove your php setup, without removing the databases from your phpmyadmin. Reinstall it.

NB: * if you want to remove all, all mention the one you need to.

sudo apt-get remove php* 

Then install the php and modules of the php version that you need. here, php 7.1:

sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached

restart your apache and check the php version.

sudo service apache restart
php -v

when all this is done, execute the following command to enable mbstring forcefully and restart your apache.

sudo phpenmod mbstring
sudo service apache restart

Hope it helps. It did to me :)

Annapurna
  • 529
  • 1
  • 6
  • 19
3

I've solved my problem by this way: Edit the php.ini file:

  1. change extension_dir = "ext" into extension_dir = "D:\php\ext" (please write ur own full path for the extension directory)
  2. change ;extension=php_mbstring.dll into extension=php_mbstring.dll (delete the ";")
  3. Then just save your php.ini file and copy it to ur Windows directory。(“C:\Windows“)
  4. restart the apache server。

The above is my solution,Hope it will work for u.

hijack
  • 381
  • 3
  • 11
3

Using xampp, this will work (php7 has been extracted to the xampp\php directory):

Make the following changes in the php.ini:

  1. uncommend (remove the ;)

;extension=php_mbstring.dll

  1. uncommend (remove the ;)

;extension=php_mysqli.dll

  1. set the path to the extention Directory

extension_dir = "ext"

to the full path, for example:

extension_dir = "C:\xammp\php\ext"

Additional, change the xampp-settings in the httpd-xampp.conf:

  1. change

LoadFile "C:/xampp/php/php5ts.dll"

to

LoadFile "C:/xampp/php/php7ts.dll"

  1. change

LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"

to

LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"

  1. change all appearance (3 times) of

IfModule php5_module

to

IfModule php7_module

That's it.

2

I had this problem in the past with MAMP on a Windows machine.

Open MAMP start page and go to your current configuration of PHP (phpinfo). Check the Configuration File (php.ini) PATH.

Mine was set to C:\Windows, where of course I had no PHP.ini file.

Either change the php.ini path to C:\MAMP\conf\php5.6.8 (or your php version conf path) or just copy php.ini to c:\windows.

HotRod
  • 126
  • 4
2

after installing WAMP 3 with Apache 2.4.17 and php5.6.17 I tried to look at php.ini from wampserver (green icon in tray). It wasn't finding it. I copied php.ini from the php.5.6.15 directory to the apache2.4.17\bin\ directory and phpmyadmin worked fine without missing mbstring

Michel
  • 21
  • 1
2

Solved it.

I tried all of the solutions above but it still did not work. I'm currently using WAMP to launch the mysql server. When I tried to open the "php.ini" file with the WAMP panel, it said that it did not exist and asked me to create a new "php.ini" in the location, "C:\wamp\bin\apache\apache2.4.17\bin". Once I created this new "php.ini" file, I located the existing "php.ini" file which was in the path "C:\wamp\bin\php\php5.6.15", and cloned it. I then pasted the clone in the previous path where it had asked me to create the "php.ini" file.

Hope this helped.

2

I just installed WAMP 3 on Windows 10 and had this issue.

I had to go to C:\wamp64\bin\php\php7.0.0\ and copy the php.ini file to C:\wamp64\bin\apache\apache2.4.17\bin\

Then I restarted WAMP, and was finally able to access my phpMyAdmin file.

Note: this is probably not the correct way to do this because now there are 2 php.ini files. There is probably a setting in an Apache file that points to the php.ini file, but I haven't seen that yet. I will update this if I find it.

Travis Heeter
  • 13,002
  • 13
  • 87
  • 129
1

Strangely, I noticed that the php.ini file that WAMP was using wasn't the one in the php directory, but rather was referencing a php.ini file in the bin directory... I copied my php.ini file to wamp\bin\apache\apache2.4.17\bin directory, restarted the wamp services and PHPMyadmin was off and running...

PGallagher
  • 3,123
  • 2
  • 26
  • 37
1

In newer versions of PHP, "extension_dir" is not initially enabled.

calvinf
  • 3,754
  • 3
  • 28
  • 41
Froschkoenig84
  • 566
  • 4
  • 13
0

In php's directory try change extension of configuration file (php.ini-development - default value of this file). I changed it to php.ini and phpmyadmin has worked.

0

The program can't start because php_mbstring.dll is missing from your computer. Try to fix it.

i use appserver to localhost and my server: C:/AppServ/www/dvd2/variables.php

Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0
Apache/2.2.8 (Win32) PHP/5.2.6
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
0

To solve this problem on Linux, you need to recompile your PHP with the --enable-mbstring flag.

0

You might get this error message if you've just installed the phpmyadmin package but haven't restarted apache yet; try restarting apache.

Joey Rich
  • 391
  • 3
  • 7
0

Please uncomment the following lines at php.ini

;extension=php_mbstring.dll ;extension=php_exif.dll ; Must be after mbstring as it depends on it ;extension=php_mysql.dll ;extension=php_mysqli.dll

This will help to solve.

0

The version of phpadmin you have installed is not compatible with the version of apache. Install the compatible version and you should be fine

Nitesh
  • 1
0

I recently updated from PHP 5.4.44 to PHP 5.6.12 on my Windows 8.1 OS and got this phpMyAdmin missing mbstring error message.

After trying the above suggestions, none of which worked for me, I discovered version 5.4.44 placed the DLL extensions in the PHP root directory whereas version 5.6.12 placed them in the PHP\ext subdirectory.
All very fine except unfortunately someone forgot to change the php.ini accordingly. So two possible solutions:

  1. Copy the DLL extensions from the ext sub-directory into the PHP root directory, or
  2. Edit the php.ini file to call all the DLL extensions from the ext sub-directory.

I chose the easier first and phpMyAdmin now works fine.

DrT
  • 1
0

Depending on you OS, you might need to install additional packets, e.g. php5-mbstring in SLES Linux.

lilalinux
  • 2,903
  • 3
  • 43
  • 53
0

I check phpinfo() and look for this line:

Configuration File (php.ini) Path          C:\Windows

And I copy php.ini from C:\xampp\php to the folder and it works for me.

ket
  • 945
  • 1
  • 9
  • 15
0

I had the same problem, the above solutions are not worked for me.

What I did is uninstalled the wamp and logout the Skype and re-installed wamp.

Then It got worked. I think the port used by wamp and Skype is same.

Hope this input will help.

Cheers :)

Muhamed Riyas M
  • 5,055
  • 3
  • 30
  • 31
0

my solution : Copy a shortcut from your php.ini from your php-directory to the apache-dir. This way you refere too 1 file on the correct place. This solved (at least in my case) the problem.

0

just copy the php.ini file from C:\wamp\bin\apache\apache2.4.17\bin to C:\wamp\bin\apache\apache2.4.17\bin and then again restart apache server.. it will work fine.

Masum
  • 119
  • 11
0

My solution:

I had wamp x32 installed before, needed to remove and then installed the x64, receiving the same message "The mbstring extension is missing. Please check your PHP configuration.".

On php.ini, all references to wamp, such as extension_dir = were pointing to "C:/Program Files/Wamp/...". Check all paths, the correct for me is "C:/Wamp64/". Restart services and it's all right now.

Daniel Lemes
  • 279
  • 4
  • 21
0

The installation process adds the phpMyAdmin Apache configuration file into the /etc/apache2/conf-enabled/ directory, where it is read automatically. The only thing you need to do is explicitly enable the mbstring PHP extension, Because sometimes you forgot to enable the mbstring mode so simply type the below command to enabled the mbstring mode...

   sudo phpenmod mbstring

Afterward, restart Apache for your changes to be recognized:

sudo systemctl restart apache2
Arslan Maqbool
  • 519
  • 1
  • 7
  • 21
-1

My Manifestation of this Problem

For me, using WAMP 3.0.0, the problem was that WAMP was looking for php.ini in the following directory on my PC: C:\wamp64\bin\apache\apache2.4.17\bin

Solution

However, there was no file there for the default version of PHP that was selected (PHP 5.6.16). I changed to PHP 7.0.0 by left clicking the WAMP notification icon, selecting 'PHP', selecting 'Version', and choosing '7.0.0'.

Alternative Solution

In the 'C:\wamp64\bin\php' directory on my PC, there were sub-directories for both PHP 5.6.16 and 7.0.0. Both of these had php.ini files in them. An alternative solution would have been to copy one of these files to the 'C:\wamp64\bin\apache\apache2.4.17\bin' directory on my PC.

Joe Flack
  • 866
  • 8
  • 14