Home > Backend Development > PHP7 > How to install mysqli extension in php7

How to install mysqli extension in php7

醉折花枝作酒筹
Release: 2023-02-18 07:52:01
forward
3003 people have browsed it

Use the php mysqli extension to operate the mysql database. It is an enhanced version of the mysql extension library. It has improved efficiency and security. It supports object-oriented programming and also provides a process-oriented programming style.

How to install mysqli extension in php7

1. Installation steps

1. Find mysqli

2 in the php7.2 ext directory. Enter /usr/local/php7.2/bin/phpize

3 and execute ./configure --with-php-config=/usr/local/php/bin/php-config in the mysqli folder --with-mysqli=/usr/bin/mysql_config

4, make

5, make install

2. Pitfalls encountered

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

Solution steps

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. 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

Modify it to

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

Recommended learning: php video tutorial

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:
php
source:csdn.net
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