I\'ve installed Apache2 with php5 support and everything works there. I\'ve installed PostgreSQL and am able to connect to it using the terminal and execute SQL statements.
Install the php5-pgsql package solves the problem. (depending on the version ... php4-pgsql for php4)
apt-get install php5-pgsql
Remember to restart Apache.
/etc/init.d/apache2 restart
--Note that it might be hard if you do not administer your server.