Starting with PHP 7, on Ubuntu (i.e., 16+), you can run:
`sudo apt-get install php-pgsql`
Um die PostgreSQL-Unterstützung zu aktivieren, müssen Sie PHP mit der
Option --with-pgsql[=DIR] kompilieren.
DIR
ist das Basis-Installationsverzeichnis von PostgreSQL,
normalerweise /usr/local/pgsql. Falls das
shared-object-Modul verfügbar ist, kann PostgreSQL mit der
extension-Directive in der php.ini
oder der Funktion dl() geladen werden.
Starting with PHP 7, on Ubuntu (i.e., 16+), you can run:
`sudo apt-get install php-pgsql`
On a Windows server, configured with Apache, adding the following line to httpd.conf to load libpq.dll can save you a lot of time :
LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq.dll"
Note that you will have to change your folder accordingly to the installation path and version of PostgreSQL you have installed. Also note that having Apache and PostgreSQL on the same server for production environments is not recommended.
Cheers,
Serjik