PostgreSQL + PHP installation on Windows 2003 x64
Avishkar Autar · Jan 10 2011 · Databases
Well the PostgreSQL installation itself is easy enough, getting it to work with PHP is the challenging part. Here’s what I did:
- Install PostgreSQL
- Edit php.ini, uncomment “extension=php_pgsql.dll”
- Edit environment variables, add PostgreSQL /bin and /lib directories to Path. This solves the issue of php_pgsql.dll not loading due to it not being able to resolve dependencies.
- Download http://files.dll-vista.com/dllvista-php_pgsql.dll.zip, replace php_pgsql.dll with the one in the zip file. This solves the issue where you get a message about php_pgsql.dll not being a valid win32 application if you run php.exe;
- Done. PHP should now be able to communicate with PostgreSQL.