What is Mbstring?
The Mbstring is an extension of PHP and stands for multi-byte string functions. It is basically used to represent the non-ASCII strings. As there are many languages those can be represented by one to one mapping to an 8-bit value but also some languages those require more than 8-bit mapping, thus, they need the mbstring to encode multibyte characters and express more than 256 unique value or characters in the regular bytewise coding system. Mbstring is designed to handle Unicode-based encodings such as UTF-8 and UCS-2 and many single-byte encodings for convenience PHP Character Encoding Requirements.
If you are dealing with some web applications based on PHP that deals in the multibyte characters language then it will require the mbstring PHP extension. Here is the way to install or enable the mbstring PHP extension on a server with WHM/Cpanel.
How to enable mbstring PHP extension in WHM:
Step 1: Login to your WHM (web hosting management) installed on VPS or dedicated server.
Step 2: You need to log in it as root.
Step 3: After successfully accessing the WHM, search the Software section from the left side options panel of the WHM.
Step 4: Under the Software, click on the EasyApache.
Step 5: On the top of the EasyApache4 you will find your current installed Cpanel profile that consists of all packages of Apache and PHP.
Step 6: Click on the Customize button.
Step 7: From the left side given options select the PHP extensions.
Step 8: Now in the search box type mbstring
Step 9: The system will search and show you the available mbstring extensions corresponding to the available PHP versions.
Step 10: If you want to enable mbstring for all available PHP version then simple toggle the button given in front of them. Or slide the toggle only to specific PHP version’s mbstring.
Step 11: After enabling the mbstring, click on the Review option given on the left side.
Step 12: Scroll down and click on the Provision button. As you click on this button the WHM will install the mbstring php extension for all Cpanel account created under that.
How to enable mbstring PHP extension in Cpanel:
If you don’t want to enable the mbstring for all Cpanel accounts then the administrator or the user can directly login to its website’s Cpanel account to enable the mbstring PHP extension.
Here for tutorial purpose, we are using the Godaddy Cpanel of some shared hosting. However, the steps will be the same for other hosting services such as Bluehost, Kinsta, Hostgator and more.
- Go to your Hosting provider.
- Login to access your website Cpanel Dashboard.
- Scroll down to the Software section of the Cpanel.
- Click on the option “Select PHP version“
- Now you will get a screen with all available PHP extensions. And on the top left side, you will see the drop down box to select the PHP version you want to enable for your website.
- Change the version, if you required otherwise leave it as it is.
- Now find the mbstring extension from the given extensions packages.
- When you found the mbstring, just check the box given in front of it in order to enable.
- After selecting the mbstring, click on the Save button given at the bottom.
In this way, you can install or enable the mbstring PHP extension for your web applications from WHM or Cpanel.
- Check WordPress / PHP memory limit of a website
- How do you start your own website for free on Google?
- Install Android VM Image on Virtualbox or Vmware
- How to Create a Database in PHPMyAdmin
- How to install phpMyAdmin on Centos 7 & Centos 6
- Install XAMPP on Windows and Linux to use Marina DB, Perl, and PHP on a local host