The method of installing mysqli extension in php7
This article mainly explains the "php7 installation mysqli extension method", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "php7 installation mysqli extension method"!
This article operating environment: centos 7 system, php 7, thinkpad T480 computer.
Here's how php 7 installs the mysqli extension, let's take a look at it.
1. Find the mysqli under the php7.2 ext directory
2. Enter / usr/local/php7.2/bin/phpize
3. Execute. / configure-- with-php-config=/usr/local/php/bin/php-config-- with-mysqli=/usr/bin/mysql_config under the mysqli folder
4 、 make
5 、 make install
Errors encountered in the process of installation and their solutions
Problem 1: if you can't find mysql_config, you may not have mysql-devel installed.
Source where MySQL needs to be installed
At this point, the relevant repo of MySQL appears in the / etc/yum.repos.d/ directory.
Yum install mysql-devel
Problem 2: when installing mysqli, error: ext/mysqlnd/mysql_float_to_double.h: No such file or directory appears
Resolution steps
1. Vim / home/tmp/php-7.2.11/ext/mysqli/mysqli_api.c (find your installation directory here)
2. Modify the path of line 36 of the file
/ ext/mysqlnd/mysql_float_to_double.h
Modify to
/ home/tmp/php-7.2.11/ext/mysqlnd/mysql_float_to_double.h Thank you for your reading, the above is the content of "php7 installation method of mysqli extension", after the study of this article, I believe you have a deeper understanding of the method of installing mysqli extension on php7, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!