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!