How to install the mysqli extension in php7: 1. Find mysqli in the ext directory and execute the phpize command; 2. Execute the [./configure] command in the mysqli folder; 3. Execute the [make install] command.
The operating environment of this article: centos 7 system, php 7, thinkpad t480 computer.
The following is how to install the mysqli extension in PHP 7. Let’s take a look at it together.
1. Find mysqli in the php7.2 ext directory.
2. Enter /usr/local/php7.2/bin/phpize
3. In Execute ./configure in the mysqli folder --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/bin/mysql_config
4, make
5. make install
2. Errors encountered during the installation process and solutions
Problem 1: If mysql_config cannot be found, mysql-devel may not be installed
Need to install the source of MySQL
At this time, the relevant repo of MySQL will appear in the /etc/yum.repos.d/ directory
yum install mysql-devel
Question 2: When installing mysqli, an error occurs: ext/mysqlnd/mysql_float_to_double.h: No such file or directory
Solution steps
1. vim /home/tmp/php- 7.2.11/ext/mysqli/mysqli_api.c (find your installation directory here)
2. Modify the path on line 36 of the file
/ext/mysqlnd/mysql_float_to_double.h
to
/home/tmp/php-7.2.11/ext/mysqlnd/mysql_float_to_double.h
Recommended learning: php training
The above is the detailed content of How to install mysqli extension in php7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
