64

I have a problem running phpMyAdmin. When I try to access phpMyAdmin in my browser, I get the error message: "The mbstring extension is missing. Please check your PHP configuration."

I have already searched on the internet for possible solutions. According to that, I made some modifications in php.ini file. I uncommented the line ";extension=php_mbstring.dll" and wrote the full path of the ext folder in extension_dir. Sadly, it still doesn't work.

Could you please help me finding the proper solution.

Markus
  • 2,944
  • 6
  • 30
  • 46
Klemen Rejec
  • 641
  • 1
  • 5
  • 3
  • 1
    Did you restart your web server after the modification in php.ini? – Robert Gabriel May 05 '15 at 07:56
  • Is the DLL actually in the extension folder? –  May 05 '15 at 07:56
  • Hey! The .dll is in the ext folder and I restarted apache after modifying php.ini. Btw, my OS is win 8. Everything looks OK, but it doesn't work. Is it possible that the versions of apache, php, mysql are not compatible? I installed: Apache 2.4.12 Win32, php-5.6.8-Win32-VC11-x86 and mysql-5.6.24-winx64. – Klemen Rejec May 05 '15 at 11:59
  • 1
    I solved the problem. I made a copy of php.ini and put it in c:\windows. It seems that the system did'n get the right information about the php.ini file. – Klemen Rejec May 07 '15 at 07:16
  • 1
    Please check the output of `phpinfo()` to see whether the extension appears to be loaded there. You can check that by loading your phpMyAdmin like `https://example.com/phpmyadmin/phpinfo.php` or by creating a new file (call it info.php or whatever) with the content `` Use your web browser's search feature to look for "mbstring". – Isaac Bennetch May 07 '15 at 12:32

14 Answers14

51

just run these command

sudo apt-get install phpmyadmin php-mbstring php-gettext

sudo service apache2 restart

Or you can follow this post...

Check This Post

Sameer
  • 676
  • 5
  • 6
20

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 path)
  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
  • 333
  • 3
  • 9
  • In my case, I uncommented the **extension=php_mbstring.dll** line in php.ini as recommended in step 2 above, but note that it's also necessary to uncomment the following line right after it: **extension=php_exif.dll**. Once I did this, I was able to run phpmyadmin without the mbstring error. – deeholzman Jan 03 '17 at 17:57
  • It does seem odd that PHP can recognize the php.ini file in the php location yet still requires the one in the WINDOWS folder to work properly. This answer helped with all my extension issues with PHP. – Dawson Irvine May 10 '20 at 21:56
19

If you are ubuntu 14.04 and using php 5.6 You are missing out on mbstring and mysql module

Please install mbstring and mysql by

sudo apt-get install php5.6-mbstring
sudo apt-get install php5.6-mysql

and restart apache

sudo service apache2 restart
Suraj
  • 415
  • 4
  • 8
  • 1
    This is what did it for me. I tried apt-get installing php-mbstring, but it installed on the latest version of php (7), and my current version of php is 5, so it didn't install to the correct folder path on my system. – Millar248 Dec 07 '19 at 13:44
11

It could happen after you update your php version, for instance if you upgrade from php5.6 to php7.1 you need to run these commands:

sudo apt-get install php7.1-mbstring
sudo service apache2 restart

If your destination version is different you need to check if the mbstring package exsit or not, an example for php7.0:

sudo apt-cache search php7.0-mbstring

I found it useful to first check existence of all modules that you working with, then performing an upgrade, in addition to that update phpmyadmin after upgrading your php is a good idea

Arash Rabiee
  • 751
  • 2
  • 11
  • 25
8

In my case i made a new installation of php7 using xampp, the error was in php.ini at line 699, i just did

include_path= C:\Program Files (x86)\xampp\php\PEAR

to

include_path= "C:\Program Files (x86)\xampp\php\PEAR"

and it worked for me.

I checked this by running the php.exe it gave me that error and i fixed it.

Ahmed Ali
  • 334
  • 5
  • 14
7

Change extension_dir = "ext" to extension_dir = "C:/php/ext" in php.ini.

Marek Woźniak
  • 1,666
  • 14
  • 31
3

I have solved my problem by this way:

  1. Edit the c:\php\php.ini file:

  2. change extension_dir = "ext" into extension_dir = "c:\php\ext" (please write
    ur own path)

  3. change ;extension=php_mbstring.dll into extension=php_mbstring.dll (delete
    the ";")
  4. restart the apache server。

I Hope it will work for u.

3

This worked for me on Kali-linux 2018 :

apt-get install php7.0-mbstring

service apache2 restart
Durodola Opemipo
  • 167
  • 1
  • 10
1

You also need to define PHPIniDir - c:/php_install_path

Atanu Roy
  • 1,294
  • 2
  • 15
  • 29
1

You can try this

sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
service apache2 restart
Mourad MAMASSI
  • 717
  • 10
  • 13
1

It could raise the concern if you're either:

Case 1: Downgrading/ upgrading any PHP version.
Case 2: Enabling/Disabling (Switching) between PHP versions.

Here are some recommended commands I found helpful to fix these concerns:

Message 1: The mbstring extension is missing.......

sudo apt-get install php7.1-mbstring  

Message 2: The mysqli extension is missing.......

sudo apt-get install php7.1-mysqli

Note: Tested with PHP version 7.1. Change PHP version as per requirement.

Vishal Kumar
  • 792
  • 8
  • 10
0

this ones solved my problem

1.open command prompt in administration

  1. then open apache bin folder like this,

    c:\ cd wamp\bin\apache\apache2.4.17\bin>

  2. then type after the above

    c:\ cd wamp\bin\apache\apache2.4.17\bin> mklink php.ini d:\wamp\bin\php\php5.6.15\phpForApache.ini

  3. thats it close the command prompt and restart the wamp and open it in admin mode.

  4. original post : PHP: No php.ini file thanks to xiao.

Community
  • 1
  • 1
Aravindh Gopi
  • 1,810
  • 22
  • 32
0

before you do other way, please do open php.exe on your PHP folder. run it and if you faced any error statement on it, you can fix it manually. else, do most-usefull post in this thread.

zigots007
  • 44
  • 5
0

I see this error after I disabled php5.6 and enabled php7.3 in ubuntu18.0.4

so i reverse it and problem resolved :DDD

Hojjat
  • 71
  • 1
  • 3