linux – centos+enabling mbstring extension in php.ini still not showing in phpinfo()

linux – centos+enabling mbstring extension in php.ini still not showing in phpinfo()

You are using CentOs so the extensions extension is .so. In the above example, you are enabling windows DLLs.

Try uncomment or add extension=php_mbstring.so.

  1. First install mbstring
sudo yum install php-mbstring
  1. check if the mbstring is appearing in php -m | grep mbstring

  2. check the extension directory in phpinfo in my case it was /usr/lib64/php/modules/

  3. httpd/appache is looking for extensions in /etc/httpd/modules
    In my case, I copied the file

$ cp /usr/lib64/php/modules/mbstring.so /etc/httpd/modules/mbstring.so
  1. sudo service httpd restart

Note then if you are using AWS EC2 try to stop and start the server to
reload the new modules
it works for me just after stopping and starting EC2

  1. [optional] last in php.ini put
[mbstring]
mbstring.language = all
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = UTF-8
mbstring.substitute_character = none;
mbstring.func_overload = 0
mbstring.strict_encoding = Off

linux – centos+enabling mbstring extension in php.ini still not showing in phpinfo()

Leave a Reply

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