I'm trying to create a database using PHP and MySQL but keep getting an error:
"Fatal error: Call to undefined function mysqli_connect()".
I've looked around and have seen and tried implementing the suggested fixes:
I have uncommented the lines:
extension=php_mysql.dll
extension=php_mysqli.dll
I have made sure the ext
destination is correct as well.
I have also added the libmysql.dll
to the C:Windows\System32\
destination.
However, I still have the error.
This is the database I'm trying to run:
<?php
$dbhost = 'localhost:8088';
$dbuser = 'root';
$dbpass = 'rootpassword';
$conn = mysqli_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
{
die('Could not connect: ' . mysqli_error());
}
echo 'Connected successfully';
$sql = 'CREATE Database test_db';
$retval = mysqli_query($conn, $sql);
if(! $retval )
{
die('Could not create database: ' . mysqli_error());
}
echo "Database test_db created successfully\n";
mysqli_close($conn);
?>
This is my PHPInfo:
Any help will greatly appreciated.
Thank you