Search code examples
phpmbstring

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.


Solution

  • 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