Active12 days ago
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 am having trouble enabling mysql in my php-config. Apt-get install php-mysql and apt-get install php7.0-mysql don't make a difference. Also, the shared object is missing from the php extension. Hello i am facing the same problem The mysqli extension is missing. Please check your PHP configuration. Services Plans.
I installed FFP 0.7
Missing MySQL Extension - Struggling To Resolve Downloaded libmysql.dll and pasted that in system32 folder, php5 directory and in ext folder. All in the aim of trying to figure out why the MySQL extension won't load. In my homepage phpmyadmin, i see an error: The mysqli|mysql extension is missing. Please check your PHP configuration In this video will help you how to fix. I've got some problems with the following error: 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' I've been searching.
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;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?
nyedidikeke3,42766 gold badges2323 silver badges3838 bronze badges
Roald Van Der TempelRoald Van Der Tempel19522 gold badges44 silver badges1111 bronze badges
23 Answers
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/
gviewgview11.7k22 gold badges3030 silver badges4040 bronze badges
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
marcboffinmarcboffin
Downgoat8,41233 gold badges3535 silver badges5656 bronze badges
ashishyadaveee11ashishyadaveee11
Check the
remove it if it is there. that should fix the problem.
pravchukpravchuk
If you have Wordfence plugin installed I found commenting out the suPHP_ConfigPath lines in the .htaccess file brought the website back to life:
I've reported this to Wordfence too.
Dan SnikDan Snik
When you upgarde your php version, make sure, apache2 follows.You can create a phpinfo() file which could show that apache is still using the old php version.
In this case you should use the a2dismod php-old-version and a2enmon php-mod-version commands
Exemple :
in ubuntu, your grab the old version from /etc/apache2/mods-enabled, or from the version shown by the phpinfo file, and you grab the new one from /etc/apache2/mods-available
amineamine
This Error is created by the WP core file /wp-includes/load.php and the function name is
wp_check_php_mysql_versions()
.The older versions of the WP does not support MySqli. But the latest WP versions support both MySql and MySqli extensions without bothering installed PHP versions.
Solved my problem 100%
In my case, I just updated the Wordpress core files manually and solved the issue :)
Reza MamunReza Mamun
If people are using shared Linux hosting with cPanel (Godaddy, Reseller club, Hostgator or any Shared Hosting), try the following:
Under Software and Services tab -> Select PHP Version -> PHP Selectors | Extentions
Tick all MySQL related extensions, save it and you are done. Please check the attached image.
subhash Porjesubhash Porje
It maybe the reason The php mysql api is deprecated.if your using below < PHP5.5 just update in your server to 5.6 and above.
Raj008Raj0082,87122 gold badges2222 silver badges2222 bronze badges
Ng Zhong QinNg Zhong Qin64822 gold badges99 silver badges2424 bronze badges
In my case, using CPanel PHP selector and selecting the mysqli and mysqlnd worked.Ensure to save and recheck once
Francis DSouzaFrancis DSouza
I had same issue as mentioned ' Your PHP installation appears to be missing the MySQL extension which is required by WordPress' in resellerclub hosting.
I went through this thread and came to know that php version should be greater than > 5.6 so that wordpress will automatically gets converted to mysqli
Then logged into my cpanel searched for php in cpanel to check for the version, luckly was able to find that my version of php was 5.2 and changed that to 5.6 by making sure mysqli is tick marked in the option window and saved it is working fine now.
Mallesh.NMallesh.N
This issue was due to lack of database. If it is a fresh installation, you need to manually create one and assign user with privileges.
Please check in wp-config.php for any bad configurations and make sure that database and tables are not missing or corrupted.
antony_sebastianantony_sebastian
Enable Mysqli Extension
Just installapt-get install php5-mysqlndRestart Apacheservice apache2 restart
MOHAMED RAIYANMOHAMED RAIYAN
Make sure you tick Mysqli and mysqlnd as shown in the screenshot
csandreas1csandreas1
When I upgraded my website PHP from version 5.6 to 7.2, I encountered this problem “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”. It turns out that mysql extension is no longer supported in PHP version 7.2. It is now using mysqli extention. I am using old version of WordPress which still using mysql extension that is why the problem existed. So what I did is upgraded the WordPress to the core. This solve the problem.
Here's the steps I followed when upgrading WordPress manually.
- First I created a full backup of my website. This is very important in case of mistake.
- I download the newest WordPress ZIP file from wordpress.org.
- I unzipped the file into a local directory of my computer.
- I went to my website root directory and deleted your ‘wp-includes’ and ‘wp-admin’ directories. I used sFTP connection using Filezilla software.
- I uploaded the new wp-includes and wp-admin directories from the new version of WordPress I unzipped to my website root directory and replaced the directories I just deleted.
- I did not delete the wp-content directory or any of the files in that directory. I just copied over the files from the wp-content directory in the new version of WordPress to my existing wp-content directory. All existing files with the same name have been overwritten.
- I copied all files from the root (‘/’) directory of the new version of WordPress that I unzipped into my website root directory (or the root directory of your WordPress installation). Existing files has been overwritten and new files has been copied across. wp-config.php file was not be affected because WordPress has never distributed with a wp-config.php file.
- I compare wp-config-sample.php which was distributed with WordPress but did not find anything to change so I just used the old one.
- I cleared my browser cache to ensure I can see all changes.
- I checked the site and there is no error now. The upgrade was completed.
15.3k77 gold badges6363 silver badges128128 bronze badges
Jason TorremochaJason Torremocha
For php 5.6
sudo apt-get install php5.6-mysqlnd-ms
and restart your apachePranoy SarkarPranoy Sarkar
The source of this message was unrelated to the solution in my case.
My ip address of my server changed and i didn't change the
<VirtualHost>
directive in my httpd.conf of the apache server.Once i changed it to the correct ip address the message disappeared and Wordpress is working again.
Tinus TateTinus Tate1,39611 gold badge66 silver badges2121 bronze badges
I have resolved the issue just adding following code in .htaccess file. I hope this will work for you guys also.
Step 1: Change the PHP version form the server.
Step 2: Add the following code in your .htaccess file according to your PHP version (Selected from the server).
To switch to PHP 4.4:
To switch to PHP 5.0:
To switch to PHP 5.1:
Mysqli Php 7
To switch to PHP 5.2:
To switch to PHP 5.3:
To switch to PHP 5.4:
To switch to PHP 5.5:
To switch to PHP 5.6:
To switch to PHP 7:
To switch to PHP 7.1:
Mr. HKMr. HK1,76011 gold badge1010 silver badges2626 bronze badges
On Oracle Linux 7.x running PHP version 7.3.x you need to run
sudo yum install php-mysqlnd
in order to install the missing MySQL extension for PHP.Remember to restart PHP and or your server for the changes to take effect.
nyedidikekenyedidikeke3,42766 gold badges2323 silver badges3838 bronze badges
veggiebenzveggiebenz
I just removed custom php ini, which I don't use at all. The problem gone, site is working fine.
Imran HossainImran Hossain
2019-08-28
After nearly seven years this keeps getting different answers.† Many are similar--but none identical--to what worked for me. Here's what worked for me (Ubuntu server).
Moving a site to a new server, forgot to install the PHP MySQL module/extension. I ran a quick
and then
Bada bing. No php5, php7; just plain
php-mysql
.† Exposing one of StackExchange's few downsides: An answer may be exquisite in the moment and receive a kajillion upvotes. Unfortunately as the technology behind the answer ages (projects fork and change focus, plugins atrophy, goals shift), sometimes that perfect answer simply doesn't work anymore. But it's got all the upvotes, so it's what we see first. Not sure what the solution is--if we even need one; it's not incredibly common an issue.
zedmelonzedmelon
Not the answer you're looking for? Browse other questions tagged phpmysqlwordpressnas or ask your own question.
Viewed 4k times
This question already has an answer here:
- mysqli not working in xampp windows 4 answers
- Apache 2.4 with PHP 5.4: no mysql available 1 answer
- PHP 7.1.x - mysqli_connect Isn't Defined (Extension is turned on) 1 answer
This is NOT a duplicate question, as I stated...I've already tryed solutions found here on Stack overflow. Most of the questions related to older versions of XAMPP and none of the solutions worked. Hence the reason I posted this..it's a newer version of XAMPP and pretty much everything the solutions suggest are already live in the config files. So no, this is NOT a duplicate.
Okay, I've tired asking this on the Apache Friends Forum and got no response on how to fix it. I've also tired solutions that I've found here, none have worked. I have XAMPP for Windows v7.1.6, a fresh install on a new machine. I've checked my php.ini file and the mysqli.dll file is correctly listed and not commented out. I have started the MySQL server and attempted to access phpMyAdmin via localhost/phpmyadmin and I get the error message:
The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.
I'm trying to get this up so I can continue a project I'm working on but can't seem to get phpMyAdmin to work at all. Any help anyone can provide would be wonderful. If you want to see my full php.ini file, in the even that maybe I missed something, I'd be happy to paste that in here as well.
Thanks in advance for everyone's help!
Kevin Lupo
Kevin LupoKevin Lupo
marked as duplicate by Jay Blanchard phpJul 11 '17 at 14:02
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.