InMotion Hosting Support Center

When configuring a website to work with different languages on a Linux server, the mbstring extension will need to be installed on the server for the website functionality to work. The mbstring extension is what php uses to parse different language encoding's. This article will explain how to install the mbstring extension through shell.

Checking for the mbstring through shell

Check your server for the mbstring extension through Linux Command line. Running the following command will display the mbstring information on your server.

root@vps#### [~]# php -m | grep mbstring

If the results show nothing, then the mbstring is not installed on the server. The next section will explain how to install the mbstring extension through shell with Root access.

Steps to install the mbstring extension

The mbstring extension can be installed through shell by using Easy Apache. The following steps will explain how to install mbstring through Easy Apache.

Important! This is for Virtual Private Servers or Dedicated server with ROOT ACCESS. If you do not have root access, you will need to have support install the mbstring extension for you.

  1. Shell (SSH) into the server.
  2. Start a screen session by typing the following. Installing mbsting step one set up Screen Session

    root@vps#### [~]# screen -S screenname

    Checking the Screen sessionYou can check the screen by typing the following.

    root@vps#### [~]# screen -ls
    There is a Screen on:
    22342.upgrade (Attached)
    1 Socket in /var/run/screen/S-root

    The screen session will allow the server to run in the background. This is to prevent the process from being interupted during the recompile process. If the window is closed, The process can still be found on the server. Otherwise, the process will be killed which could break the server.

  3. Type the Easy Apache PathType the path for Easy Apache.

    root@vps#### [~]# /scripts/easyapache

    Cpanel Update Screen Select NoWhen you get the "cPanel update available" box saying "would you like to update now," select No and hit Enter.

  4. Start Customizing based on profileSelect Start customizing based on profile and hit Enter.
  5. Choosing the specific apache to buildOn the "Please choose which apache to build screen," leave the selected build.

    Select Next step and hit Enter.

  6. Choose specific php to buildLeave the selected php version on the "Please choose which specific PHP version (s) to build" screen.

    Select Next Step and hit Enter.

  7. Short list OptionsThe "Short Options List"will appear.

    Select "Exhaustive options list" and hit Enter.

  8. Select mbstring from the listPage down till you see the Mbstring extension listed.

    Arrow down to the Mbstring extension and hit the space bar to select the Mbstring.

    Select Next Step and hit enter.

  9. Save the Apache Php buildNow the server will ask "What do you want to do now?"

    !! EXTREMELY IMPORTANT !! IF YOU ARE NOT IN A SCREEN SESSION. DO NOT INTERUPT THE SERVER PROCESS. Interrupting the server process will break the server and will require systems support to fix the apache configuration. If you are not comfortable continuing, please contact support and we can do this for no charge.

    Select Save and Build and hit enter.

  10. Confirm the PHP Apache buildIn the Confirm build screen, Select Yes and hit Enter.
  11. Select I Understand to continue the php apache rebuildEasy Apache will finally ask to Please acknowledge.

    Select "I Understand" and hit Enter.

    Apache and PHP will now rebuild. Wait for the process to finish. The process time can vary; however, typically it should take ~10 to 30 minutes. Once the process is finished, check your phpinfo. You should see the Mbstring extension in the phpinfo now.

Was this article helpful?
Continued Education in Course EA3
You are viewing Section 1: Install the mbstring PHP Extension with EasyApache 3
Section 2: How to Update EasyApache 3 to EasyApache 4

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2016-11-17 8:28 am

I get the message EasyApache3 is not available when EasyApache4 is in effect when attempting step 3.

Please advise.

31,595 Points
2016-11-17 10:46 am
As the error suggests, it seems like you may have an additional version of EasyApache (4) currently running already. Ensure you have closed/ended all instances of EasyApache before proceeding.

If your problems persist, Live Support should be able to help you install mbstring on your server.

Thank you,
n/a Points
2016-07-06 3:34 pm

Till the step: 3 everything is alright 

but hitting :the code:  /scripts/easyapache

it gives the error: Perl: warning: setting local failed

With a disordered page a selected in green color:Please  choose a profile to load

underneath :as a text :

perl: warning: Setting locale failed.

? Please choose a profile to load ??????????????????????????????????????????????????????????????????????????????????????????????????????

                                                                                                LANGUAGE = (unset),

                                                                                                                        LC_ALL = (unset),


        LC_CTYPE = "UTF-8",

                                LANG = "en_US.UTF-8"

                                                        are supported and installed on your system.

                                                                                                   perl: warning: Falling back to the standard locale ("C").









42,943 Points
2016-07-07 7:25 am
Hello M'hamed Hmimid,

Sorry for the problem with the update. If the script is failing, then you need to contact our live support team in order to have that fixed. We have no way to repair a broken easyapache script, if it's failing. If you're not a customer, then you will need to contact your technical support team for your hosting service.

If you have any further questions, please let us know.

Kindest regards,
Arnel C.
n/a Points
2015-11-06 2:41 am

Very helpful! Thank you so much.

n/a Points
2014-09-18 12:53 am


Thanks for nice artical.


I am getting "Fatal error: Call to undefined function mb_strlen() in /home/username/public_html/admin/model/sms/sms.php on line 1"

So I request you to please help me slove this issue.

Will you able to help me?


Mithun Deshmukh


31,595 Points
2014-09-18 8:49 am
Hello Mithun,

Thank you for contacting us. We are happy to help, but will need some additional information. This guide in on how to install mbstring

In your error it says mb_strlen is undefined. You must install this function, if it is missing.

This can be installed using EasyApache, I found this solution in the official cPanel forums.

If you have any further questions, feel free to post them below.

Thank you,

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

7 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!