InMotion Hosting Support Center

When working on your website, you may encounter an error stating: Fatal error: Call to undefined function mb_substr(). This is caused by a particular module not being included in your PHP configuration. In this article, we will teach you how to resolve the issue to get your site back up and running.

What causes this error?

This error is caused because you are missing the mbstring module within your PHP configuration. While not required by most software, some may use it for multibyte character encoding. If the code that you are using requires multibyte character encoding, you will receive this error when the mb_substr() function is called.

How do I fix this error?

To resolve this error, you would need to install the mbstring PHP module. If you are on a VPS or dedicated server, this can be done quite easily.

If you do not have root access

If you do not have root access on your server, you will need to either obtain root access, or submit a ticket with technical support so that they may compile PHP with suppport for mbstring. Once mbstring is enabled on the server, your errors should no longer persist.

If you have root access

If you have root access to your VPS or dedicated server, you may simply use EasyApache to recompile PHP with mbstring support. To do so, you may follow these instructions:

  1. First, you will need to log into your WHM as root.

  2. Next, search for EasyApache in the top left search box, then click on EasyApache

  3. Now that you are on this page, select the radio button next to Previously Saved Config, then click Start customizing based on profile.

  4. Next, you will be prompted to select your Apache version. Just select keep the already selected options. We will not need to make any changes to Apache.

  5. After the Apache screen, you will then select your PHP version. You will want to keep this the same as what is already selected as well, since changing your PHP version can potentially break your existing sites if they require a higher or lower version of PHP. Just click the Next Step to visit the next page.

  6. After selecting your PHP version, you will be sent to the Short Options List. Scroll to the bottom of the page and click on Exhaustive Options List.

  7. Now that you are on the Exhaustive Options List, you will see Mbstring under the PHP section. To enable mbstring, click the checkbox to the left of it. Once it is selected, scroll to the bottom and click on Save and Build.

  8. Once you click the Save and Build button in EasyApache, it will begin building. Be sure not to close the window or navigate away from the page. Doing so can cause issues to your Apache configuration. Once it has completed, your errors should no longer persist.

Support Center Login

Social Media Login

   
Social Login Joomla

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
n/a Points
2014-03-12 11:13 am

Thank you very much :) Very clear, simple and effective tutorial.

I'm working on a directory (using phplinkdirectory) of classifed ads websites and had this error every time when I was trying to add a link

Just ran a test and VOILA!! error has disapeared :)

Thank you,

Helmuts Meskonis

Outlived Classifieds 

p.s. if I could suggest >> mark in red and bold the part: "Be sure not to close the window or navigate away from the page"

thank you one more time :)

Staff
16,896 Points
2014-03-12 11:30 am
Hello Helmuts,

Thank you for letting us know. I'm glad this article was helpful. I have highlighted the the notification as you suggested.

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

-John-Paul
n/a Points
2014-05-14 2:58 am

Great Help !!!

Lots of cheers.. it works and data is being pulled by enabling Mbstring.

 

 

n/a Points
2014-09-11 9:40 am
this solve my problem
n/a Points
2015-01-10 1:35 am

I just followed the instructions, and now when I refresh my website, I get a 404 error. What happened? 

Staff
25,274 Points
2015-01-12 11:41 am
Hello Dominic,

Sorry to hear you're having problems with the website. Unfortunately, without seeing your website, we can't try to troubleshoot the issue. Make sure that you double-check any changes that you might have made as any small error could lead to the problem that you are facing. If you want us to look into the issue further, please provide a description of the issue, any specific error messages, and steps that you are taking to duplicate the problem. We would also appreciate a URL or domain name to look at the site.

If you could provide us further information then we should be able to look at the issue in more depth for you.

Regards,
Arnel C.
n/a Points
2015-01-12 11:29 am

Yep, worked for me too. Thanks for the post. however, it seems after this process, It created another subdirectory that i now have to point my domain to in order to avoid a 404 error. Is this typicall or just a random coincidence? 

Staff
25,274 Points
2015-01-12 11:50 am
Hello Dominick,

It is not typical. As per my previous reply, please review all of the steps and make sure that you have not left any part out. If you continue to have problems with the issue, please provide the information requested above (in your previous comment) so that we can troubleshoot the issue.

Kindest regards,

Arnel C.
n/a Points
2015-07-18 7:07 am

Hey Thanx a lot,

I searching about this issue since 1 week, finally my error solved...

thanx again..

 

God Bless You

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

9 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

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: support@InMotionHosting.com
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!