Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Php - Your PHP installation appears to be missing the MySQL extension which is required by WordPress

How do I fix the error below?

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I use my NAS with a telnet connection.

I installed FFP 0.7

My php.ini is in: ffp/etc/php.ini and I uncommented everything I thought to be of use.

Below is a portion of my php.ini file;

;If you wish to have an extension loaded automatically, use the following ; syntax: ; ;   extension=modulename.extension ; ; For example, on Windows: ; extension=msql.dll ; ; ... or under UNIX: ; extension=msql.so ; ; ... or with a path: ; extension=/ffp/lib/extensions/no-debug-non-zts-20100525/mysql.so ;   extension=php_mysql.dll extension=php_mysqli.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll extension=php_pdo_oci.dll extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.so 

The outstanding issue is that when I run in phpinfo(), I see the module MySQLi activated but not MySQL.

MySQL is working as expected just as PHP and Lighttpd web server.

I equally have phpmyadmin working.

It's on a Zyxel NSA310.

Also, when mysqld is started, it creates a shortcut from my root to: ffp/opt/mysql.. and every time I restart my NAS the shortcut is deleted.

Does anyone might know a trick for this?

like image 708
Roald Van Der Tempel Avatar asked Jul 17 '13 08:07

Roald Van Der Tempel


People also ask

How do you check if MySQL extension is installed?

Check PHP MySQL Extension is InstalledUnder the MySQL Support, find the Client API version cell check the PHP version. Tip: Use Ctrl+F and type MySQL Support to find this section instead of scrolling through the file. Restart the server to apply the changes.

Which PHP extension is required for work with MySQL?

There are 3 PHP MySQL extensions: ext/mysql (not recommended) ext/mysqli. PDO_MySQL.


2 Answers

in the end i found a solution First, make sure MySQL server is running. Type the following command at a shell prompt:

/etc/init.d/mysql status

If MySQL is not running, enter:

/etc/init.d/mysql start

If MySQL is not installed, type the following command to install MySQL server:

apt-get install mysql-server

Make sure MySQL module for php5 is installed:

dpkg --list | grep php5-mysql

To install php5-mysql module enter:

apt-get install php5-mysql

Next, restart the Apache2 web server:

/etc/init.d/apache2 restart

like image 93
marcboffin Avatar answered Sep 21 '22 05:09

marcboffin


The php mysql api is deprecated. It's kaput --- going away -- not to be used, finito.

If you have a modern version of PHP (> 5.6) then Wordpress should automatically switch to make use of mysqli. That should be your first attempt.

If you can not update your php, rather than attempting to resurrect something that php no longer supports, just patch your wordpress: http://wordpress.org/plugins/mysqli/

If you are already running a modern version of PHP, then this is likely because you don't have the mysqli extension in your version of PHP. You can check this using php -i from your server OS, or make a page with <php phpinfo(); and navigate to that page with your browser. There will be section for all the extensions.

If you don't have the mysqli extension installed, follow the instructions from the official PHP documentation.

like image 22
gview Avatar answered Sep 21 '22 05:09

gview