Mysqli is enabled but server doesn't see it?

Okay, hopefully someone can help me with this. I’m trying to install the latest version of vBulletin (5.6.4) on my local machine for testing so I can start building a site for someone. But for some reason, I’m getting this error (warning really, but it’s a showstopper) when I try to install it:

Warning: Use of undefined constant MYSQLI_NUM - assumed 'MYSQLI_NUM' (this will throw an Error in a future version of PHP) in phar://C:/web/Apache24/htdocs/vB564/core/vb/vb.phar/db/mysql/assertor.php on line 44

A System Error has occured.

The software is experiencing a systems error.

You should attempt to repeat your last action. If this error occurs again, please contact the site administrator.

So I ran vBulletin’s file called vb_test.php, to check my server compatibility, and got this error:

**Fatal error** : Uncaught Error: Class 'mysqli' not found in C:\web\Apache24\htdocs\vb_test\vb_test.php:39 Stack trace: #0 C:\web\Apache24\htdocs\vb_test\vb_test.php(239): DB::fetch_db('localhost', 'root', 'qwerty321', 'vb564test') #1 {main} thrown in **C:\web\Apache24\htdocs\vb_test\vb_test.php** on line **39**

After a bunch of troubleshooting, I finally created a file with <?php phpinfo(INFO_MODULES); ?> in it, ran it, and for some reason mysqli isn’t there!

I have no idea why mysqli isn’t being seen by the server. Please help!

Dev Environment:

  • Windows 10 (fully updated)
  • PHP 7.4.14
  • Latest versions of Apache and MariaDB

It’s not answering your question, @cbiweb but if you’re starting afresh, it would be better to use PDO rather than MySQL-I.

And the place to learn that was given in one of your other threads (The only proper) PDO tutorial - Treating PHP Delusions

Okay, but vBulletin uses MySQLi. Pardon my ignorance (though I will definitely check out the article), but how would PDO solve the MySQLi problem?

Sorry, no, that was an aside. It doesn’t help with your issue - and if vBulletin is using MySQLi you’ll need to stick with that for now. You can’t really mix and match.

1 Like

mysqli problem solved!

In php.ini I had to change
extension_dir = ext
to
extension_dir = “C:\web\php7\ext”

I’m a frickin’ genius. :lol:

3 Likes