WAMP + PostgreSQL integration

If you want to extend an existing Windows WAMP installation with a PostgreSQL database execute the following steps:

Apache 2.2.X configuration
Add the next line to the Apache 2.2.x httpd.conf configuration:
LoadFile “C:/Program Files/PostgreSQL/9.1/bin/libpq.dll”

Above line must be entered before the next line.
LoadModule php5_module “c:/wamp/bin/php/php5.2.11/php5apache2_2.dll”

PHP 5.2.X Configuration
Enable (remove trailing ; character) the following two lines in the php.ini configuration file.

Restart WAMP
Restart the wamp (apache, php and mysql) software.

Create the following test.php file and place it in the apache www root directory:

echo extension_loaded('pgsql') ? 'yes':'no';

When the php file is executed ( in apache the following information must be showed on screen.


3 comments to WAMP + PostgreSQL integration

  • Kusum Ram


    Please help me I am not able to integrate postgres with wamp.

    After adding
    LoadFile “C:/Program Files/PostgreSQL/9.5/bin/libpq.dll”
    Wamp stopped working.

    Please give me some solution for this.

    Thanks & Regards,

  • Yulie

    Kusum Ram,

    although i DO HOPE that you have solved this problem, what worked for me was to delete and re-write the ” before the letter C and after .dll “.

    I just noticed that the quotation marks were slightly different from the ones used in the http.conf file.


  • Bert

    Thanks for this.

    And thanks to Yulie! I should have known, but you saved me considerable time!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>