Background
I have WAMP Server (3.0.6) installed on my Windows 10 computer. I am developing a WordPress site using a few custom MySQL tables, so I'm using $wpdb
.
Problem
I was running on PHP 7.0.10, and everything was fine. This morning, I installed PHP 7.1.4, and suddenly I got this error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in ...\wp-includes\wp-db.php:1573
I dug into it and traced the issue back to the __construct()
function, and this if
statement:
if ( function_exists( 'mysqli_connect' ) ) {
A var_dump showed me that function_exists( 'mysqli_connect' )
is returning false
.
Not the answer
The problem is NOT that I don't have the mysqli
extension enabled:
Things That I've Tried
I have switched back to 7.0.x (and the error disappeared), deleted 7.1.4, reinstalled 7.1.4, and switched back to it. It still doesn't work.
I tried 7.1.0, and it doesn't work.
I've tried toggling the extension on and off, and that changes nothing.
I've tried copying the actual php_mysqli.dll
file from the working 7.0.10 directory, into the 7.1.4 directory, and that doesn't work.
Edit
Per request, I've added screenshots of what is what is showing from phpinfo()
. Under 7.0, I see the info section for mysqli, and under 7.1, the section is missing.