When installing WordPress or other PHP applications requiring MySQL, users may encounter an error indicating that the MySQL PHP extension is missing. This article addresses this issue, providing a step-by-step guide to resolving it.
The first step is to ensure MySQL server is running. Execute the following command in a shell prompt:
/etc/init.d/mysql status
If MySQL is not running, start it using:
/etc/init.d/mysql start
If it's not installed, install it with:
apt-get install mysql-server
Next, install the PHP MySQL module using:
dpkg --list | grep php5-mysql
To install the module, run:
apt-get install php5-mysql
Finally, restart the Apache web server to make the changes effective:
/etc/init.d/apache2 restart
These steps should resolve the "Missing MySQL PHP Extension" error, allowing you to continue with your PHP application installation.
The above is the detailed content of How to Fix the \'Missing MySQL PHP Extension\' Error?. For more information, please follow other related articles on the PHP Chinese website!