Thursday, August 30, 2012

How to use PostgreSQL with WAMP server

Assuming you have installed PostgreSQL and your WAMP installation is on c:\wamp, you will need to copy
c:\wamp\bin\php\php5.3.9\libpq.dll   to   c:\wamp\bin\apache\Apache2.2.11\bin

Make sure you also have the following files
C:\wamp\bin\php\php5.3.9\ext\php_pdo_pgsql.dll   and

Also, make sure you have enabled the above 2 files as extensions, either via the WAMP menu (click on WAMP icon on taskbar, PHP, PHPExtensions, find the above 2 and 'check' them)

Please note that php5.3.9 and Apache2.2.11 refer to my specific PHP and Apache versions.
Adjust those to suit your installation.  

That's it!

ps: Comments and/or links to this article are most welcome!


  1. I am using MAMP server for that what will be steps of PostgreSQL?

  2. i have a trouble with both xampp server and postgres why do i need them if i have xampp server only i can create database also and i dont understand the use of postgres my second question i have a website that done by dreamweaver and a database is connected by postgres and i am a database admin of that organization a website is implemneted before i hired to there and data input to that website is thru client computer over wifi not lan and the server computer was windows server 2007 and a website folder was @ htdocs of wamp server and there is already installed a postgres which i dont know the use of this and when i upgrade the OS and try to fix as it was pgconnect fail and i dont know how to fix it as it was before i need help

    1. I am afraid I can't help with the above.
      Your best chance would be to post a question in