Home > Article > System Tutorial > How to install mbstring extension under CENTOS7?
1.Uncaught Error: Call to undefined function mb_strlen();
When the above error occurs, it means that we have not installed the mbstring extension;
2. Enter the PHP installation 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 the php extension
4../configure --with-php-config=/usr/local/php7-abel001/bin/php-config According to your actual installation directory
5. Compile make && make install
6. At this time, mbstring.so has been 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 reload php-fpm
9.php -m command can check which extensions have been enabled; php --ini can see some configuration information of php
The mbstring extension has been successfully installed!
The above is the detailed content of How to install mbstring extension under CENTOS7?. For more information, please follow other related articles on the PHP Chinese website!