Why is the mysqli extension missing in PHP 7, and how can I enable it?

Barbara Streisand
Release: 2024-11-18 04:45:02
Original
150 people have browsed it

Why is the mysqli extension missing in PHP 7, and how can I enable it?

Enabling MySQLi Extension in PHP 7

Introduction

Upon installing PHP 7 and MySQL on Ubuntu 14.04, users might experience difficulties locating the MySQLi extension using phpinfo(). This article addresses the issue and provides a solution to enable the MySQLi extension in PHP 7.

Problem

When attempting to use phpMyAdmin or executing phpinfo(), users encounter the error message "The mysqli extension is missing." This error suggests that the MySQLi extension is not enabled in PHP 7.

Solution

The absence of the MySQLi extension in the list of installed extensions is due to the deprecation of php5-mysql, the package that facilitated PHP's connection to MySQL. To resolve this issue, install the new package php-mysql:

This command will automatically update Apache and PHP 7 and thereby enable the MySQLi extension.

The above is the detailed content of Why is the mysqli extension missing in PHP 7, and how can I enable it?. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template