<?php
try {
$dbh = new PDO('pgsql:host=localhost;port=5432;dbname=###;user=###;password=##');
echo "PDO connection object created";
}
catch(PDOException $e)
{
echo $e->getMessage();
}
?>
I get the error message "Could Not Load Driver"
Try this:
Uncomment the following in php.ini by removing the ";"
Use the following code to connect to a postgresql database server: