views:

184

answers:

5

I just installed Apache 2.2.11 and downloaded the zip for PHP5.2.9-2

I uncommented

extension=php_pdo_pgsql.dll

and

extension=php_pgsql.dll

But when I call the phpinfo() function, postgresql is not showing up. What am I forgetting?

Also, on the PHP site, I found this:

In order to enable PostgreSQL support, --with-pgsql[=DIR] is required when you compile PHP. DIR is the PostgreSQL base install directory, defaults to /usr/local/pgsql. If shared object module is available, PostgreSQL module may be loaded using extension directive in php.ini or dl() function. I recognise that this is ment for Linux, but is there something written here, telling me to do something I've forgotten?

+1  A: 

In your php.ini make sure that the extension_dir directive is pointing to the folder that contains the php_pgsql.dll file.

Also check your HTTP error log for errors.

Jordan S. Jones
Didn't do that yet. I've now set the extension_dir to "C:\php\ext", but no effect yet. Gonna go check those logs.
WebDevHobo
+1  A: 

Did you restart Apache after making changes to your php.ini? The PHP module in Apache wont pickup changes until a restart is performed.

Cody Caughlan
I know, most basic of things.
WebDevHobo
A: 

You still need the 'client library' portion of pgsql in order to load php_pgsql.dll or php_pdo_pgsql.dll. Also, for future reference, you can use a tool like Dependency Walker to load the PHP dll files and see the missing runtime linkage.

TML
A: 

I had the same problem, searched over internet for nearly a day, still can't fix it.

A: 

Anyone have a solution to this, I have having the exact same problem. I have searched everywhere and still no solution.

JR