I have figured out the issue. I needed to change the extension_dir. I had changed it to the correct path before, but because either I had the wrong version of PostgreSQL, or the libpq.dll, that change didn't help. And down the road I changed it back and forgot about it.
I've installed PHP 5.4.4, Apache 2.2, and PostgreSQL 9.1 on Window 7 (64bit).
When I tried to run phpPgAdmin, I get the following error: "Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option."
After a whole day of googling and trying, the same message still show up. Here's what I've done so far, please advice what I may have done wrong:
on php.ini, I have the following:
extension_dir = "./ext" extension=php_pdo_pgsql.dll extension=php_pgsql.dll
On Apache's httpd.conf file, I added this:
Loadfile "C:\Program Files (x86)\PostgreSQL\9.1\bin\libpq.dll"
I had tried replacing the PHP/libpq.dll with the one comes with PostgreSQL 9.1, but that doesn't help. I tried copying libpq.dll, libiconv-2.dll and libintl-8.dll to Apache's bin folder, as well as PHP's folder, still no avail.
I made sure PostgreSQL was 32bit. I'm clueless at this point. Any advice is greatly appreciated.