Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Initialize mbstring with PHP 7

Whenever I try to access phpMyAdmin, I receive the following error:

"The mbstring extension is missing. Please check your PHP configuration."

I am running a LEMP stack on a CentOS 7 server. I have elected to use PHP 7 for this installation. I have not experienced this error on identical set-ups running earlier versions of PHP.

extension_loaded('mbstring') returns false even though mbstring.ini (/etc/php.d/) contains:

; Enable mbstring extension module extension=mbstring.so 

I am 100% sure that the mbstring module is installed on my server.

I'm completely stumped so if anyone has any ideas whatsoever, please let me know. Thanks.

like image 264
NoahMCM Avatar asked Dec 26 '15 13:12

NoahMCM


People also ask

How do I know if PHP is using Mbstring?

You can check it through phpinfo(). Search for the string "mbstring" in phpinfo page. If it is present means then mbstring is enabled or it is disabled.


1 Answers

For those who have debian :

 sudo apt-get install php7.0-mbstring 

Otherwise in centos (tested in centos 6.6)

sudo yum install php70w-mbstring 

and as @mpen said you can activate it

sudo phpenmod mbstring 
like image 68
Chopchop Avatar answered Sep 22 '22 05:09

Chopchop