Home  >  Article  >  Backend Development  >  What is the method to install mysqli extension in php

What is the method to install mysqli extension in php

王林
王林Original
2020-11-10 09:27:233145browse

The method for php to install the mysqli extension is: 1. Find the mysqli directory under the ext directory and execute the [/usr/local/php7.2/bin/phpize] command; 2. Configure the system environment; 3. Execute [make && make install] command to compile and install.

What is the method to install mysqli extension in php

Installation steps:

(Learning video sharing: java video tutorial)

1. Find mysqli

in the php7.2 ext directory. 2. Enter

/usr/local/php7.2/bin/phpize

3. Execute in the mysqli folder

./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/bin/mysql_config

4. make

5. make install

Possible problems during the installation process:

Solution:

1. If mysql_config cannot be found, it may be that mysql-devel# is not installed.

##1. You need to install the source of MySQL

2. At this time, the relevant repo of MySQL will appear in the /etc/yum.repos.d/ directory

3. Execute the command

yum install mysql-devel

2. When installing mysqli, an error occurs: ext/mysqlnd/mysql_float_to_double.h: No such file or directory

Solution:


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

Modified to

/home/tmp/php-7.2.11/ext/mysqlnd/mysql_float_to_double.h

Related recommendations:

phptraining

The above is the detailed content of What is the method to install mysqli extension in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to set string in phpNext article:How to set string in php