The mbstring extension of php7 under the linux-centos7 cannot be loaded normally, how to solve? -- Solved,

Source: Internet
Author: User
1. problem: the php mbstring extension cannot be loaded normally. 2. environment: centos7.2 virtual machine, PHPVersion & amp; gt; 7.0.8 my php is installed through yum, the installation source uses webstatic, and the mbstring extension also uses this source, the version is correct. View etcphp. dm... 1. problem: the mbstring extension of php cannot be loaded normally.
2. environment: centos7.2 virtual machine, PHP Version => 7.0.8
My php is installed through yum, and the installation source uses webstatic. the mbstring extension also uses this source, and the version is correct.
View the extensions enabled in/etc/php. d/mbstring. ini, and/lib64/php/modules/mbstring. so also exists.
However, an error is returned when the mb_strlen () function is called:
3. code and errors

      1 
  
PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in /var/www/php-test/mb-encoding/mb-strlen.php:2 349 Stack trace: 350 #0 {main} 351 thrown in /var/www/php-test/mb-encoding/mb-strlen.php on line 2

4. Supplement:
Some in php-m

> php -m | grep mbstringmbstring

But not in php-info
5. solved:
Someone asked this question before: https://segmentfault.com/q/10...

Reply content:

1. problem: the php mbstring extension cannot be loaded normally.
2. environment: centos7.2 virtual machine, PHP Version => 7.0.8
My php is installed through yum, and the installation source uses webstatic. the mbstring extension also uses this source, and the version is correct.
View the extensions enabled in/etc/php. d/mbstring. ini, and/lib64/php/modules/mbstring. so also exists.
However, an error is returned when the mb_strlen () function is called:
3. code and errors

      1 
   
PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in /var/www/php-test/mb-encoding/mb-strlen.php:2 349 Stack trace: 350 #0 {main} 351 thrown in /var/www/php-test/mb-encoding/mb-strlen.php on line 2

4. Supplement:
Some in php-m

> php -m | grep mbstringmbstring

But not in php-info
5. solved:
Someone asked this question before: https://segmentfault.com/q/10...

php -m | grep mbstring

This is here. if you are not there, you will not be there.
If not, download the mbstring source code again, compile and install it.

The above is the answer before the subject changes ..

No extensions are loaded in ini. will php-m contain?
Is php-cli the same version as php-cgi?
It won't be because the local machine has two versions of php ..

Someone has asked this question before. please refer to this question at https://segmentfault.com/q/10 ....
The main reason is that after the extension is installed, the php-fpm (FastCGI Process Manager: FastCGI Process Manager) is not restarted, resulting in inconsistent php configuration files loaded by cgi and cli.

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.