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

How to install mbstring extension in php under linux system?

coldplay.xixi
Release: 2023-03-02 19:14:01
Original
3214 people have browsed it

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
Copy after login

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安装目录而定
Copy after login

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
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template