Yes, Postgresql can certainly work with PHP. Are you on Windows or Linux? If on windows, you'll need to find the right dll (not a clue here, I run Linux) if on Linux / Unix, you'll either need the right package (in redhat it's something like php-pgsql-4.2.2-8.0.5.i386.rpm.) or recompile the php executable with a --with-pgsql switch.