I am trying to connect to my database (remote server) which has PostgreSQL installed in it. My PHP code is trying to connect to the database using pg_connect(), but I get th
Edit. I just noticed you were mentionning MAMP. My advice is for Windows but may be useful if you know what corresponding tools to use.
Things to try:
Have you restarted PHP and Apache since your editing of php.ini?
Is the php_pgsql.dll found in your php\ext directory?
Are you running php as a module? If so, try copying the php_pgsql.dll file in the Apache\bin directory.
Are you running PHP from the command line with a flag specifying a different php.ini file?
You could try using a tool such as Sysinternals' Filemon to view what files are attempting to be accessed when running PHP.
You could try using a tool such as Dependency Walker to look at the dependencies for the postgreSQL DLL, in case you have a missing dependency. Quick search brought up ldd for Unix.