<?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"
You need to install the pgsql module for php. In debian/ubuntu is something like this:
sudo apt-get install php5-pgsql
Or if the package is installed, you need to enable de module in php.ini
extension=php_pgsql.dll (windows)
extension=php_pgsql.so (linux)
Greatings.