Devi ricompilare PHP con l'opzione --with--pgsql=/path/to/pgsql nel ./configure