search
HomeBackend DevelopmentPHP ProblemHow to install mysqli extension in php7

How to install mysqli extension in php7

Sep 06, 2021 pm 04:08 PM
mysqliphp7Expand

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

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function