Home >Database >Mysql Tutorial >How Do I Enable the MySQLi Extension in PHP 7 on Ubuntu 14.04?

How Do I Enable the MySQLi Extension in PHP 7 on Ubuntu 14.04?

Patricia Arquette
Patricia ArquetteOriginal
2024-12-03 22:51:12667browse

How Do I Enable the MySQLi Extension in PHP 7 on Ubuntu 14.04?

Enable MySQLi Extension in PHP 7

Issue:

Upon installing PHP 7 and MySQL 5.5.47 on Ubuntu 14.04, you may encounter a missing MySQLi extension, hindering the use of phpMyAdmin.

Solution:

The php5-mysql package is no longer supported in PHP 7. To enable MySQLi, install the following package:

sudo apt-get install php-mysql

This package includes both MySQL and MySQLi drivers, and will automatically update Apache and PHP 7.

Verification:

To confirm that MySQLi is enabled, you can use phpinfo():

<?php
phpinfo();
?>

Look for the "mysqli" section in the output to verify that the extension is loaded.

The above is the detailed content of How Do I Enable the MySQLi Extension in PHP 7 on Ubuntu 14.04?. 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