You need to ensure that the PostgreSQL support module is installed, and then to configure it in your php.ini file by adding a line like this:
extension=pgsql.so