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.