The solution to the problem that php does not support mysqli: first enter the php source code package and find the pcntl extension directory; then use phpize to generate the configuration file; then load the mysqli.so extension in the php.ini configuration file; finally restart php- fpm is enough.
#The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.
php does not support mysqli, is there any way to generate mysqli.so?
1. Enter the php source code package and find the pcntl extension directory
[root@php ~]# cd ./php-5.6.7/ext/mysqli/
2. Use phpize to generate the configuration file
[root@php pcntl]# phpize [root@php pcntl]# ./configure
3. Make && make install installation
[root@php no-debug-non-zts-20131226]# ls bcmath.so gd.so opcache.a mysqli.so calendar.so mcrypt.so opcache.so pdo_mysql.so curl.so memcache.so openssl.so posix.so
4. php.ini configuration loads the mysqli.so extension
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/mysqli.so
5. Restart php-fpm and check phpinfo in the browser.
[Recommended learning: "PHP Video Tutorial"]
The above is the detailed content of What should I do if php does not support mysqli?. For more information, please follow other related articles on the PHP Chinese website!