I am creating a PDO object like this:
try {
$dbh = new PDO( "mysql:host=$host;dbname=$db_name" , $user, $passwd );
} catch( PDOException $e ) {
echo 'Caught exception: ', $e->getMessage(), "\n";
die();
}
but there are no errors, no Exceptions and the PDO object doesn't have anything in it:
var_dump( $dbh );
outputs:
object(PDO)#5 (0) {
}
Username/password and database name are all correct.
Many thanks.