What OS are you using? For CentOS, that php extension is php-mysqlnd. Search your repository for PHP libraries with “mysql” and “nd”.
Sorry about that lack of info π I’m using Windows Server 2012 R2.
Oh. I don’t do Windows. π Let’s see if anyone else knows….
Did you look in the php’s /ext directory? If there’s a php_mysqli.dll in there, then you may just need to uncomment the extension=mysqli in the php.ini file and bounce the server instance.
Checked my 7.2 php.ini and that extension is not commented out, so i guess that’s not it. π
-
This reply was modified 6 years, 5 months ago by
swillans.
You say you’re getting a 500 error.. What is the actual error?
Look in the error log files and find the actual error message.
I have the same error and I enabled the debug on the wp-config file to find this.
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\Apache24\htdocs\clickmedia\wp-includes\wp-db.php:1658 Stack trace: #0 C:\Apache24\htdocs\clickmedia\wp-includes\wp-db.php(631): wpdb->db_connect() #1 C:\Apache24\htdocs\clickmedia\wp-includes\load.php(426): wpdb->__construct(‘admin’, ‘081447Addax’, ‘clickmedia’, ‘127.0.0.1’) #2 C:\Apache24\htdocs\clickmedia\wp-settings.php(126): require_wp_db() #3 C:\Apache24\htdocs\clickmedia\wp-config.php(90): require_once(‘C:\\Apache24\\htd…’) #4 C:\Apache24\htdocs\clickmedia\wp-load.php(37): require_once(‘C:\\Apache24\\htd…’) #5 C:\Apache24\htdocs\clickmedia\wp-blog-header.php(13): require_once(‘C:\\Apache24\\htd…’) #6 C:\Apache24\htdocs\clickmedia\index.php(17): require(‘C:\\Apache24\\htd…’) #7 {main} thrown in C:\Apache24\htdocs\clickmedia\wp-includes\wp-db.php on line 1658
I have also looked for the nd_mysql but I don’t have it on my extension list on the php.ini
These are the extensions that are currently enabled
C:\Users\User>php -m
[PHP Modules]
bcmath
calendar
Core
ctype
date
dom
filter
hash
iconv
json
libxml
mysqli
mysqlnd
pcre
PDO
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
I am also running on a local machine, PHP 7.4.5
I also don’t have the PHP configuration application to enable or disable as one suggested. So I use the PHP.ini file to make changes.
So after reading a post on stackoverflow I managed to resolve it
after uncommenting the mysqli extention
the fix happened after I added a path to the ext folder where all the extensions are sitting.
extension_dir = “C:\php\ext” instead of extension_dir = “ext”
Vxivongo,
Your solution didn’t work for me. But you still solved the problem for me. I noticed that you used the command PHP -M. When I tried it I got a VCRUNTIME140 missing error. Seems C++ redistributable 2015 was not instal on the server. Once I installed that the site worked. Thanks so much for your post.