dtkvn
dtkvn

Reputation: 581

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.

Upvotes: 48

Views: 219251

Answers (30)

Arslan Maqbool
Arslan Maqbool

Reputation: 529

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

Upvotes: 0

Annapurna
Annapurna

Reputation: 549

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

Upvotes: 4

user3759454
user3759454

Reputation: 31

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.

Upvotes: 3

Joe Flack
Joe Flack

Reputation: 974

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.

Upvotes: -1

Fatih Çelik
Fatih Çelik

Reputation: 541

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

Upvotes: 9

user2234159
user2234159

Reputation:

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.

Upvotes: 0

Imnotapotato
Imnotapotato

Reputation: 5808

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

sudo apt-get install php-mbstring

Upvotes: 10

Masum
Masum

Reputation: 119

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.

Upvotes: 0

Froschkoenig84
Froschkoenig84

Reputation: 616

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

Upvotes: 1

Travis Heeter
Travis Heeter

Reputation: 14074

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.

Upvotes: 2

Vital Rulinski
Vital Rulinski

Reputation: 41

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

Upvotes: 4

user2651478
user2651478

Reputation: 101

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

Upvotes: 10

user6071010
user6071010

Reputation: 1

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.

Upvotes: 0

Dan the Man
Dan the Man

Reputation: 21

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.

Upvotes: 2

PGallagher
PGallagher

Reputation: 3113

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

Upvotes: 1

Muhamed Riyas M
Muhamed Riyas M

Reputation: 5173

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

Upvotes: 0

ket
ket

Reputation: 995

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.

Upvotes: 0

hijack
hijack

Reputation: 431

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.

Upvotes: 4

Michel
Michel

Reputation: 21

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

Upvotes: 2

lilalinux
lilalinux

Reputation: 3031

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

Upvotes: 0

DrT
DrT

Reputation: 1

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.

Upvotes: 0

Nitesh
Nitesh

Reputation: 1

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

Upvotes: 0

HotRod
HotRod

Reputation: 126

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.

Upvotes: 2

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.

Upvotes: 0

Joey Rich
Joey Rich

Reputation: 439

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

Upvotes: 0

user4563664
user4563664

Reputation: 1

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

Upvotes: 0

user4334447
user4334447

Reputation: 1

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

Upvotes: 0

Gautam Arya
Gautam Arya

Reputation: 723

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,

Upvotes: 26

Arjang
Arjang

Reputation: 729

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

yum install php-mbstring

Upvotes: 30

user2129341
user2129341

Reputation: 1

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.

Upvotes: 0

Related Questions