search
HomeBackend DevelopmentPHP7How to install mysqli extension in php7

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!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete

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 Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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