user307880
user307880

Reputation: 59

How do I get the PostgreSQL PHP extension working on Windows?

Will you be so kind to tell me why the sysytem can't load the PostgreSQL extension for PHP? In php.ini I write:

extension=php_pgsql.dll

But when I reboot, I get this warning:

Unable to load dynamic library: C:/PHP/exe\php_pgsql.dll.

There are no problems with other extensions.

Upvotes: 0

Views: 1603

Answers (1)

h0tw1r3
h0tw1r3

Reputation: 6818

First, make sure php_pgsql.dll actually exists in c:\php\ext. If so, then you are likely missing libpq.dll, or Windows is unable to locate it at run-time.

libpq.dll should be in c:\php, and c:\php should be part of the PATH system variable.

Using dependancy walker, you can open php_pgsql.dll and see what DLL's it depends on to load and which ones Windows is unable to automatically find.

Upvotes: 2

Related Questions