Web Hosting Forum | Lunarpages

Author Topic: Your PHP installation appears to be missing the MySQL extension which is require  (Read 1682 times)

Offline michael.w

  • Spacescooter Operator
  • *****
  • Posts: 42
Just started receiving this message:

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

The site was working just a couple days ago.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6265
Was your server just upgraded to a version of PHP which no longer supports MySQL? I don't know the exact version number, but somewhere in the 7.x series I think it's going to happen. Note that MySQLi (improved) will still be supported. It may be that your Wordpress installation configuration needs to be updated somewhere to specify MySQLi instead of MySQL for the database interface. You should be keeping your Wordpress reasonably up-to-date... really old (and vulnerable) versions may not accept MySQLi.

It's also possible that some work was done on your server, such as an upgrade, and someone forgot to include MySQL (or MySQLi) in the build. You would need to open a support ticket to discuss the situation. Run the following .php script:
Code: [Select]
<?php phpinfo(); ?>to see if it lists MySQL and/or MySQLi as available. If neither is, there is a major problem with the server.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1553
    • http://www.notonebit.com
Just to clarify MrPhil's comment, "Was your server just upgraded to a version of PHP which no longer supports MySQL?", it's not that PHP doesn't support MySQL, it's that support for PHP's old mysql_* extension was dropped ages ago. You usually have the option of moving up to mysqli_* or better yet, PDO.
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline wyllys

  • Newbie
  • *
  • Posts: 3
Im having this exact same problem that just started very recently - did something change on the Firefly server?  The php engine does not seem to think any of the mysql extensions are available. 

Code: [Select]
<?php 
if (!extension_loaded('mysqli')) {
    print(
"mysqli not found");
} else {
    print(
"mysqli loaded");
}
?>


When I run this it says it is not loaded.  Same for "mysqlnd".  Though it appears that php was compiled with mysqlnd support (looking at output from phpinfo()).  Is there something we need to add to our php configuration so it can recognize the mysql extensions??



Offline cb42

  • Space Explorer
  • ***
  • Posts: 9
I am having this problem as of today on the Heka server. Same error message. None of my WordPress sites are working.

Does anyone have a definition reason for why this has started happening and how to fix it?

Thanks,
Curt

Offline cb42

  • Space Explorer
  • ***
  • Posts: 9
Using cpanel, I see that my mySql databases are there and can be inspected with phpMyAdmin.

I also see using FTP that the directories for all of my domains in public_html were modified overnight. In each, a .wellknown directory was added as well as a .ftpquota file. In addition, a .wellknown directory was added to the public_html directory.

So something has changed on this server (HEKA) in the last 24 hours.

Curt

Offline cb42

  • Space Explorer
  • ***
  • Posts: 9
I opened a support ticket and the problem has been resolved thanks to LunarPages technical support.

My server (HEKA) was migrated to Centos 7, which no longer supports suPHP. My .htaccess file (at the root and in a couple of my domain folders) had some suPHP_ConfigPath lines in them. E.g.,

suPHP_ConfigPath /home/zawin3/public_html/php.ini

Commenting these out got things working again. So for those of you dealing with this problem, check your .htaccess files, both at the root and in your domain directories. I don't know why I had this line in there, but it was probably added years ago to fix some other problem.

Curt

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6265
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

 

Share |