[php] phpMyAdmin mbstring error

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.

This question is related to php phpmyadmin mbstring

The answer is


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


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


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.


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.


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

sudo apt-get install php-mbstring

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.


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


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.


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.


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.


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.


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.


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.


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.


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

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


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.


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


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.


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


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.


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...


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 :)


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.


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

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


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


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,


  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 :)


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


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

yum install php-mbstring

Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to phpmyadmin

phpMyAdmin on MySQL 8.0 phpmyadmin - count(): Parameter must be an array or an object that implements Countable Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?' phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO) phpMyAdmin access denied for user 'root'@'localhost' (using password: NO) mysqli_real_connect(): (HY000/2002): No such file or directory How to create a foreign key in phpmyadmin #1292 - Incorrect date value: '0000-00-00' MySQL error - #1932 - Table 'phpmyadmin.pma user config' doesn't exist in engine phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration

Examples related to mbstring

Composer - the requested PHP extension mbstring is missing from your system phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration phpMyAdmin mbstring error Fatal error: Call to undefined function mb_detect_encoding() How to install PHP mbstring on CentOS 6.2 How to enable mbstring from php.ini? How to write file in UTF-8 format? Unable to call the built in mb_internal_encoding method?