While trying to connect to a database, I got the following error:

Fatal error: Cannot instantiate non-existent class: mysqli in c:\hosting\webhost4life\member\mychow\test.php on line 13

Is this a problem with my connection? I have something like this:

$mysqli = new mysqli("[IP Address]", "[name]", "[pw]", "[database]");

Thanks! It had been really frustrating, hopefully somebody can help shed some light on this!

    mysqli extension isn't loaded....

      bpat1434 wrote:

      mysqli extension isn't loaded....

      Ah, does that mean my hosting company doesn't have it? Or is this something I can do...?

        nope, you'll have to use classic mysql functions instead

          You can ask the hosting company to enable the mySQLi extension; however, most likely they'll decline. If you're on a dedicated server, it's up to you to install & get it running.

          Most good hosts would test out the feasability of running mySQL and mySQLi side-by-side before giving you a definite answer. To be honest, I'm thinking it can be done. Whether the host would do it or not is a different story. Never hurts to ask.

          But if not, you can always use mySQL and manually optimize your queries!!

            Yeah that was it... classic PHP worked. Thank you all!

              Write a Reply...