That would indicate its not connecting to the database (setting aside the rest of the errors).
You can try a simple script to connect and maybe capture the error.
<?php
error_reporting(E_ALL);
$db_server = "localhost";
$db_user = "username";
$db_passwd = "password";
$db_name = "elkarte";
$db_port = 0;
$connection = mysqli_connect($db_server, $db_user, $db_passwd, $db_name, $db_port);
if (!$connection)
{
echo mysqli_connect_error();
die;
}
echo "success";