Bobcares

Quick ways to enable mbstring in php.ini

by | Sep 27, 2019

Looking for ways to manage special text on your websites?

One of the best ways for this is to enable mbstring in php.ini.

Usually, mbstring extension in web servers helps to manage the non-ASCII codes easily.

At Bobcares, we often get requests to enable mbstring extension, as a part of our Server Management Services.

Today, let’s see how our Support Engineers enable the mbstring extension for our customers.

 

How does mbstring error look?

Let’s begin by checking more details on mbstring and how the error appears on any website.

By default, mbstring makes multibyte encoding possible in PHP. This PHP extension helps in managing non-ASCII string. A typical example would be a website that handles musical quotes. It helps to manipulate strings encoded in a multi-byte encoding.

In many situations, customers get an error message related to missing PHP extensions. This particularly happens after enabling PHP function for wrong version of PHP. Or when the website uses an alternate PHP version.

For instance, while trying to enter phpMyAdmin and the mbstring module is missing on the server, it results in an error:

 

phpMyAdmin error due to improper enabling of mbstring in php.ini

How we enable mbstring in php.ini?

Usually, adding the extension in the php.ini file enables mbstring. But, this procedure varies with different platforms.

With the expertise in Server Management, our Dedicated Engineers enable the mbsting module for our customers.

Let’s see the multiple ways that we use to enable mbstring on various platforms.

 

1. mbstring in Linux

Linux servers provide an easy way to enable PHP extensions.

Firstly, our Support Team check for the mbstring module using the command,

php -m | grep mbstring

If there is no such module, then we install it using the command,

yum install php7x-mbstring

Afterward, we make sure the presence of necessary extension in the PHP include file. A sample entry looks like:

[root@xxx ~]# cat /etc/php.d/mbstring.ini
; Enable mbstring extension module
extension=mbstring.so

Later we ensure to restart the webserver to save the changes. This enables PHP mbstring on the server. Finally, we verify the same by adding a web page that dispaly the results of the phpinfo() function.

 

2. In Windows

In the Windows server, the addition of the .dll files holds multiple codes and procedures. So, the Support Team first makes sure that the .dll file is present in the server.

Usually, php.ini is the file that contains all the PHP parameters. Thus, we access the php.ini file.

We check for the entry regarding the mbstring extension in the configuration file. We uncomment the line,

extension = php_mbstring.dll

Later, we save the changes and restart the webserver.

 

3. Enabling mbstring in cPanel

In servers having a cPanel, it is easier to enable mbstring. So, for cPanel customers we enable mbstring as follows:

  1. Firstly, we login to the cPanel account.
  2. Next, we go to the Software section.
  3. Here, we click the drop-down to Select the PHP version.
  4. Now, select the PHP extension mbstring.
  5. Finally, click the save button.

 

[Having difficulty in enabling PHP mbstring? – We will do it for you.]

Conclusion

In short, to manage non-ASCII strings, we enable mbstring in php.ini. Today, we saw how to enable mbstring on different server platforms. We also saw how our Support Engineers fix the mbstring error in phpMyAdmin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF