Fatal Error - Undefined function mysqli_connect

From: Date: Sun, 04 Sep 2011 09:31:58 +0000
Subject: Fatal Error - Undefined function mysqli_connect
Groups: php.db 
Request: Send a blank email to php-db+get-47997@lists.php.net to get a copy of this message
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

« previous php.db (#47997) next »