Skip to content
Home » Web » PHP » How to Resolve Fatal error: Call to undefined function mb_convert_encoding()

How to Resolve Fatal error: Call to undefined function mb_convert_encoding()

I met this error when I tested my newly installed PHP application server:

Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/xxx.php on line 2958

It's not because of PHP version, it's because I forgot to install an important package for multi-byte string world.

[root@test ~]# yum -y --enablerepo=remi,remi-php55 install php-mbstring
...

Finding the right package to install is the key to this kind of problems, you may also refer to my another post to see the solution: How to Resolve Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'.

Leave a Reply

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