Conjurer Posted March 18, 2009 Share Posted March 18, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/149933-solved-class-mysqli-not-found-in-filename/ Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 Seems like the mysqli extension in PHP has been disabled. You might want to contact your host about that. Quote Link to comment https://forums.phpfreaks.com/topic/149933-solved-class-mysqli-not-found-in-filename/#findComment-787434 Share on other sites More sharing options...
Conjurer Posted March 18, 2009 Author Share Posted March 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/149933-solved-class-mysqli-not-found-in-filename/#findComment-787621 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.