Home >Database >Mysql Tutorial >How Do I Fix the Missing MySQLi Extension in PHP 7 on Ubuntu?
Resolving MySQLi Extension Absence in PHP 7 on Ubuntu
To enable MySQLi functionality in PHP 7, it's necessary to address an issue caused by the deprecation of the "php5-mysql" package. Here are the steps to resolve this issue:
Uninstall the Deprecated Package:
sudo apt-get remove php5-mysql
Install the New Package:
sudo apt-get install php-mysql
This command installs the new package responsible for connecting PHP to MySQL.
Restart Apache:
sudo service apache2 restart
Confirm Installation:
To verify that MySQLi is now enabled, use the phpinfo() function in your PHP code. It should display the MySQLi extension under the "Loaded Extensions" section.
Additional Note:
If you are using phpMyAdmin, you may have encountered an error message indicating that the MySQLi extension is missing. By following these steps, you will resolve this issue and be able to use phpMyAdmin without encountering any errors.
The above is the detailed content of How Do I Fix the Missing MySQLi Extension in PHP 7 on Ubuntu?. For more information, please follow other related articles on the PHP Chinese website!