Fatal Error - Undefined function mysqli_connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

My server was upgraded to PHP 5.3.8 and MySQL 5.1.58 today and, since, I am
getting a 500 error on any script requiring a DB connection.

 

I've tried using the Procedural style example provided at
http://www.php.net/manual/en/mysqli.connect.php (as shown below), but get
the following line in my error logs:

 

PHP Fatal error: Call to undefined function mysqli_connect() in
DOC_ROOT/test2.php on line 2

 

-----  Sample code

<?php

$link = mysqli_connect('localhost', 'my_user', 'my_password', 'my_db');

 

if (!$link) {

    die('Connect Error (' . mysqli_connect_errno() . ') '

            . mysqli_connect_error());

}

 

echo 'Success... ' . mysqli_get_host_info($link) . "\n";

 

mysqli_close($link);

?>

 

If I run phpinfo(), I see the following:

Configure Command:  ..'-without-mysql'..

Additional .ini files parsed:  .. /etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini.. /etc/php.d/pdo_mysql.ini

 

Is there something wrong with the installation of PHP/MySQL?

 

Any help would be greatly appreciated.  Thanks,

 

Ben Miller

 


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux