If you are on a Linux box then check your php.ini file
It should have a line like
extension = pgsql.so
(the rough equivalent to a dll on a windows box)
there is also an extension directory line. The pgsql.so file should reside in that directory. I don't think you are allowed to put a path in the extension statment i.e. extension = /usr/lib/apache/php/pgsql.so IS WRONG.
Regards
David Evans