How to Install the MBString PHP Extension

Sometimes, I just love working with Red Hat, PHP, and MySQL.

I was setting up a new Linux server today, and I noticed the error in phpMyAdmin, a popular web-based application that uses PHP to allow a user to administer MySQL databases. I’ve been using phpMyAdmin for a long time, and the more recent versions of MySQL have been released with a Unicode character set (UTF-8), which is actually a good thing, since it can handle storing data from many more languages and language sets. However, phpMyAdmin was barking about a problem with my default Apache+PHP setup on the Red Hat Enterprise Linux 4 server:

The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

I did some research in what was involved to enable the mbstring PHP extension, and it was looking like so much work I was just going to leave it, but finally, I turned up the easy answer: Simply install the php-mbstring package. With an up2date subscription, it is easy:

up2date -i php-mbstring

Finally, bounce Apache, and the error message went away. Wow, easier than I thought…

Leave a Reply

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