Fatal error: Class 'mysqli' not found in

I keep getting this error whenever I’m trying to access my mysql database from a website. I’ve uncommented the appropriate extension from php.ini as well but I’m still getting the same error. I’m using Windows as well just in case anyone needs to know. Please help me out. Thank you.

Does it show up in phpinfo() ?
Do you have your extension_dir uncommented as well as the right path ?

Well, what is the error? If you have an error, what is it. Which MySQLi error message are you receiving?
Also, please post the connection code you are using. Remember to replace your userid and password with
*******'s so it is not posted here. There is a large number of MySQLi error checking built into PHP. But,
you must set up your code to display them in the correct order. We can show you how to do this if you
first show us your connection code. Just as an example, here is one sample connection for MySQLi…
[php]

<?php // **** This line makes the connection. Change the info to your database... **** $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection, if an error display it... */ if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit(); } /* DO SOMETHING HERE... Whatever you want to do with the database... */ $mysqli->close(); ?>

[/php]
This is just a sample from the PHP.net manual. But, as you can see, it will display the error details so you
can debug the code. If it says the table does not exist, check the spelling of your table name. If it says
the database does not exist, check the name of your database. Good luck, let us know…

Sponsor our Newsletter | Privacy Policy | Terms of Service