How to install mbstring extension in php under Linux system: first execute the code [yum install php-mbstring]; then modify [php.ini]; and finally restart the web service.
How to install mbstring extension in php under Linux system:
Method one:
1. Execute the
code as follows:
yum install php-mbstring
2. Modify php.ini
(This step is very important, some lxadmin versions cannot be modified automatically)
The code is as follows:
echo ‘extension=mbstring.so' >>/etc/php.ini #更具php安装目录而定
3. Restart web service
If it is apache: service httpd restart
, that’s it.
Method 2:
php 5.36
Installation directory: /usr/local/php
#cd /usr/src/php-5.3.6/ext/mbstring #/usr/local/php/bin/phpize #./configure --with-php-config=/usr/local/php/bin/php-config #make && make install echo ‘extension=mbstring.so' >>/usr/local/php/lib/php.ini #/usr/local/apache2/bin/apachectl restart
/usr/local/php/bin/php -v #Check whether the configuration is wrong
Use php.info to check whether mbstring is installed successfully.
Related learning recommendations:
The above is the detailed content of How to install mbstring extension in php under linux system?. For more information, please follow other related articles on the PHP Chinese website!