Easy Snippet

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:

  • http://stackoverflow.com/questions/551734/php-not-loading-php-pgsql-dll-on-windows
  • http://us.php.net/manual/en/pgsql.installation.php
Posted by Julius Prayogo at 11:50 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: apache, PHP, postgre, windows, Windows 7, XAMPP
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Pages

  • About

Blog Archive

  • ►  2019 (4)
    • ►  December (3)
    • ►  April (1)
  • ►  2018 (2)
    • ►  July (1)
    • ►  May (1)
  • ▼  2017 (3)
    • ►  June (1)
    • ▼  April (1)
      • Setup PHP with PostgreSQL connection in Windows
    • ►  January (1)
  • ►  2016 (3)
    • ►  August (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2015 (8)
    • ►  November (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (3)
    • ►  May (2)
  • ►  2014 (10)
    • ►  October (3)
    • ►  July (2)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  February (1)
  • ►  2013 (10)
    • ►  December (1)
    • ►  October (2)
    • ►  September (2)
    • ►  August (3)
    • ►  June (2)

About Me

My photo
Julius Prayogo
View my complete profile
Simple theme. Theme images by luoman. Powered by Blogger.