WAMP 2.0i and PostgreSQL on Windows

The WAMP project is an excellent Windows development stack. Simply download the latest package, run the installer and within minutes you have a full PHP/MySQL/Apache development environment. If using PostgreSQL however, you need to do a tiny little bit more configuration:
  • Left-click the WAMP systray icon, go to PHP/Extensions and make sure php_pgsql and php_pdo_pgsql are ticket (or you can do this manually in the php.ini file)
  • Go into the wamp/php/bin folder and copy libpq.dll, paste it into wamp/apache/bin
  • Also install PostgreSQL if you're connecting locally (duh).
Nothing to it really, just the second step is a bit cryptic. Failing to copy the libpq.sql into the Apache/bin directory will result in a PHP error along the lines of 'pgsql driver not loaded'. Checking phpinfo() will reveal no mention of pgsql. Also, the Apache error log may have something along the lines of "PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.2.6/ext/php_pdo_pgsql.dll' - The specified module could not be found.
in Unknown on line 0 "

Comments

Post a Comment

Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word