Support Forums

Full Version: Installing "mysqli_connect()"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know its not called mysqli_connect, but f it. Basically i need to get rid of my error "ERROR : mysqli_connect() is not exists!".

Server is centos.
Did you install the mySQL?

Then do mysqli_connect() test(had to google the exact code)

<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");

/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();
?>
Yes mysql is installed, i think i need to install mysqli.
(10-19-2010, 03:31 PM)Kaleb Wrote: [ -> ]Yes mysql is installed, i think i need to install mysqli.

Make sure MySQLi is in fact not present. The easiest way to do this is check the output of phpinfo (). Just do a search for "mysqli", it should be directly under your MySQL configuration data. If it isn't present then you'll need to install the extension. To do so you need to recompile PHP with MySQLi configured. You can find directions to do so here.
you can re-install if it is error based but I dont beleive their is a problem...
Do what Disease said