Friday, April 21, 2017

Setup PHP with PostgreSQL connection in Windows

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/9.1/bin/libpq.dll"

Then edit the php.ini file (in folder : C:\xampp\php). Enable this lines:
extension=php_pdo_pgsql.dll
extension=php_pgsql.dll


Environment:

  • Windows 7
  • XAMPP
  • XAMPP Control panel v3.2.1
  • PostgreSQL 9.1


Reference:

No comments:

Post a Comment