How to Enable Mbstring on a cPanel/WHM Server
How to Install Mbstring on a non cPanel Server – CentOS server
These are the steps to install Mbstring on servers without cPanel control panel. Steps to install on cPanel server is different. Scroll down for steps to install Mbstring on cPanel server.
Before installing Mbstring you must install “EPEL repository” on the server using command “yum install epel-release”. Remove php* from yum exclude list before installing Mbstring.
1. Log into Linux server via SSH as root
2. Type “php -m | grep mbstring” to check whether mbstring is installed on the server
root@server [~]# php -m | grep mbstring
mbstring extension is installed on the above server
3. Run “yum install php-mbstring” to install mbstring on the server.
4. You must restart apache service after installing PHP mbstring
Command : service httpd restart
Type “php -m” command to check whether it is installed. You can also create a phpinfo page under the domain to check whether mbstring is enabled.
Run the command “yum -y remove php-mbstring” if you want to uninstall Mbstring.
How to Install Mbstring on a cPanel Server with Easyapache 3
1. Log into server via SSH as ‘root’ user
2. Run the cPanel script “/scripts/easyapache” to recompile PHP
3. Click on “Exhaustive Options” in easyapache
3. Select Mbstring under PHP modules
4. Select “Save and build” to recompile PHP
How to Install Mbstring on a cPanel Server with Easyapache 4
/scripts/easyapache command will not work on Easyapache 4 server so you must do the below steps to install Mbstring. Use yum to install mbstring on easyapache 4 servers
1. Log in to linux server via SSH as ‘root’
2. Run the command “rpm -qa | grep mbstring” to check whether it is installed
3. Run the command “ea-phpXX-php-mbstring” to install mbstring
Command to install mbstring for PHP 7.0 : yum install ea-php70-php-mbstring
Command to install mbstring for PHP 5.6 : yum install ea-php56-php-mbstring
Command to install mbstring for PHP 5.4 : yum install ea-php54-php-mbstring
The below dependencies will be installed when you install php-mbstring on the server. Apache will be automatically restarted after installing php-mbstring on EA$ servers.
Type the below command to make sure mbstring is enabled.
[root@server ~]# php -m | grep mbstring
Steps to Install Mbstring through WHM on EasyApache 3 Server
1. Log in to WHM using server root password
Link to access WHM : http://YourServerIP:2086
Enter “root” in the username field
Enter server root password in the password field
2. Click on “EasyApache 3” under “Software”
Home » Software » EasyApache 3
3. Under “Exhaustive Options list” tick “Mbstring”
4. Click on “Save and Build”
It might take few minutes to run easyapache on the server. Create a phpinfo page under you website to check whether mbstring is enabled.
How to Install Mbstring on Ubuntu 16.04 Server
1. Log into Ubuntu server via SSH
2. Run the command “sudo apt-get install php7.0-mbstring php-mbstring” to install mbstring
3. Restart Apache service on the server : sudo service apache2 restart