Jump to content

[SOLVED] Class 'mysqli' not found in filename...


Conjurer

Recommended Posts

I have had a nice stable little club directory up and running and suddenly one of the forms is no longer working.  Instead when it tries to connect to the database I am getting an error message that the Class 'mysqli' not found in /home/omgma/public_html/Directory/includes/db_fns.php5 on line 6

 

That line in that file is where my database connection script is so somehow it is no longer connecting.  The db connection script is as follows:

function db_connect()
{
    
    $conn = new mysqli("localhost", "username", "password", "database");
    if (mysqli_connect_errno() > 0) 
  {
       $errmsg = "Failure - Could not connect to database with db_connect.<br />mysqli_connect_error message: ".mysqli_connect_error()."<br /><br />"; 
       throw (new Exception($errmsg));
     } 
     else
     {
//    echo "Connection worked! <br>";
     return $conn;
     }	  
} 

 

 

Are there any changes to the mysqli class that might be an issue here? 

Link to comment
Share on other sites

Thanks - I also posted a help ticket at the server site and got the following:

PHP, Apache and MySQL was updated to the latest stable release (according to http://forums.xyzhosting.com/showthread.php?t=86495 topic) and some php extensions wasn't enabled automatically by cpanel.

 

Please check all your sites and let us know if you find similar problems.

 

Grrrr... glad it is sorted but wish I had found that out a couple hours earlier!

 

Thanks for your help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.