Linux-centos7 install php Extension

Source: Internet
Author: User
Today, when Centos7 was used to use php, it was found that the mbstring extension was not installed. Therefore, after being installed with yuminstllphp-mbstring, it was found that etcphp. the d directory already has mbstring. the INI file also contains a line of extensionmbstring. sousrlib64phpmodules directory... today, when Centos7 was used in php, it was found that the mbstring extension was not installed, so yum instll php-mbstring was used.
After installation, you can find that the/etc/php. d/directory already exists. mbstring.iniThere is also a line in the file. extension=mbstring.so
/usr/lib64/php/modules/The directory also has mbstring.soFile, restart nginx and find phpinfoThere is still no mbsting extension in it. Why? Which of the following steps is missing?
The curl and other extensions under the same directory are configured in this way. Why is it loaded, but the newly installed mbstring cannot be loaded?

PS: solved. The reason is that php-fpm is not restarted after installation, and it is useless to restart nginx. Thank you!

Reply content:

Today, when Centos7 was used in php, it was found that the mbstring extension was not installed, so yum instll php-mbstring was used.
After installation, you can find that the/etc/php. d/directory already exists.mbstring.iniThere is also a line in the file.extension=mbstring.so
/usr/lib64/php/modules/The directory also hasmbstring.soFile, restart nginx and findphpinfoThere is still no mbsting extension in it. Why? Which of the following steps is missing?
The curl and other extensions under the same directory are configured in this way. Why is it loaded, but the newly installed mbstring cannot be loaded?

PS: solved. The reason is that php-fpm is not restarted after installation, and it is useless to restart nginx. Thank you!

Add extension = mbstring. so to php. ini.

Try Setting in php. iniExtension_dir.

Some people solve similar problems in this way, but I'm not sure if it is the same as the case of the subject.

sudo yum remove php-commonsudo yum install php-mbstring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.