Home  >  Article  >  Backend Development  >  How to install mbstring extension in php under linux system?

How to install mbstring extension in php under linux system?

coldplay.xixi
coldplay.xixiOriginal
2020-07-21 14:02:383172browse

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?

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

##The code is as follows:

#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

Use

/usr/local/php/bin/php -v #Check whether the configuration is wrongUse php.info to check whether mbstring is installed successfully.

Related learning recommendations:

PHP programming from entry to proficiency

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn