Nam Phương Lê
Nam Phương Lê

Reputation: 11

CentOS 7: The mbstring extension is missing

I've installed phpmyadmin (4.5.3.1) on CentOS 07 with apache server (httpd-2.4.18) and PHP 7.0.1. I get the error:

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

So I searched the internet for this error and people came with the following solution, which I tried:

Installing the php-mbstring and php-mcrypt extensions:

yum install php-mbstring php-mcrypt php-gd

this command returns:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.viethosting.vn
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.viethosting.vn
 * updates: mirrors.viethosting.vn

Package php-mbstring-5.4.16-36.el7_1.x86_64 already installed and latest version

Package php-mcrypt-5.4.16-3.el7.x86_64 already installed and latest version

Package php-gd-5.4.16-36.el7_1.x86_64 already installed and latest version

Nothing to do

Please help me!

Upvotes: 1

Views: 21014

Answers (2)

Ghasem
Ghasem

Reputation: 15573

I was wondering for like 2 hours for this issue and the only thing I missed was restarting php-fpm along with httpd.

So this freaking line solved my headache:

systemctl restart php-fpm

Upvotes: 6

mikeb
mikeb

Reputation: 11267

You need to check your php.ini and make sure it is loading the mbstring extension, or load it at runtime:

Here for the ini extension loading:

How do I configure php to enable pdo and include mysqli on CentOS?

Here for runtime loading

http://php.net/manual/en/function.dl.php

Upvotes: 1

Related Questions