How to install mysqli extension in php7

王林
Release: 2023-03-12 11:26:02
Original
3735 people have browsed it

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.

How to install mysqli extension in php7

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

How to install mysqli extension in php7

yum install mysql-devel
Copy after login

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
Copy after login

to

/home/tmp/php-7.2.11/ext/mysqlnd/mysql_float_to_double.h
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template