CENTOS7 install mbstring extension

 

1.Uncaught Error: Call to undefined function mb_strlen();
When errors occur, indicating we have no install mbstring extension;

 

2. Enter the PHP install directory
cd /temp001/php-7.1.0/ext/mbstring

 

3. start the phpize (/usr/local/bin/phpize or/usr/local/PhP7-abel001/bin/phpize) command to install PHP extensions

 

4../configure–with-php-config=/usr/local/PhP7-abel001/bin/php-config according to your actual installation directory

 

5. compile make && make install

 

6. mbstring.so is generated in the/usr/local/PhP7-abel001/lib/php/extensions/no-debug-non-ZTS-20160303/directory;

 

7.echo ‘extension=mbstring.so’ >>/usr/local/PhP7-abel001/lib/php.ini enable mbstring extension

 

8.nginx-s reload, killall PHP-fpm./php-fpm reloaded PHP-fpm

 

9.php-m command to see which extensions have been enabled; PHP–ini can see the PHP configuration information

 

Thus mbstring extension has been installed successfully!