syed fazil
syed fazil

Reputation: 3

Phpmyadmin showing mbstring is missing

I have using PHP 7.2 version,and modules list is given below:

php -m

[PHP Modules]

bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
openssl
pcntl
pcre
PDO
Phar
Reflection
session
SimpleXML
soap
sodium
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

In this list it shows mbstring but in info.php on browser it doesn't has mbstring when i searched ...anyone please help me for this issue.

Thanks in advance.

Upvotes: 0

Views: 1680

Answers (2)

Ankit Jindal
Ankit Jindal

Reputation: 4050

In case of Windows,

  1. Edit the php.ini file
  2. update extension_dir = "ext" to extension_dir = "C:\php\ext" (may vary based on your system)
  3. Remove semicolon from ;extension=php_mbstring.dll and change it to extension=php_mbstring.dll
  4. You also need to enable mcrypt as well by uncomment/remove semicolon from ;extension=php_mcrypt.dll. (Generally phpmyadmin also gives error for mcrypt)
  5. Save your php.ini file
  6. Restart the apache server

For ubuntu,

  1. Open terminal
  2. Enter command sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0
  3. Restart apache sudo systemctl restart apache2

If above method doesn't work, explicitly enable mbstring and mcrypt extensions:

sudo phpenmod mcrypt
sudo phpenmod mbstring
sudo systemctl restart apache2

Hope it works for you!!

Upvotes: 0

William Prigol Lopes
William Prigol Lopes

Reputation: 1889

The cli and apache or nginx module have different config paths and, probably, different configs. Your module is enabled on cli but disabled to web.

You need to check your php.ini

If you try to do this (on terminal):

$ php -a
phpinfo();

In a point you can see the php.ini path.

Do the same thing on your www directory creating a phpinfo.php and calling the phpinfo() function and check the php.ini path.

Probably is not the same path and not the same configurations because we have a ini file to cli and to the apache/nginx module. So, you can fix it seeing which file is loading the modules and point to enable the module on web.

If is in different path, probably you'll need to enable or install the mbstring module on web version.

Considering that you're using php-fpm you can install mbstring module with the following command:

php-fpm install mbstring

Upvotes: 1

Related Questions