Cannot Initialize mbstring with PHP 7

NoahMCM picture NoahMCM · Dec 26, 2015 · Viewed 73.6k times · Source

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.

Answer

Chopchop picture Chopchop · Mar 9, 2016

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