pgsql module not loading
Posted by: z3phir (86.104.109.---)
Date: August 14, 2008 09:29AM

hi

i use the latest version of wamp on windows xp sp3
everything worked great until i needed to acces a pgsql db
i tried to activate the php extension but it dosen't work

in the error log i get
[14-Aug-2008 10:18:19] 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
[14-Aug-2008 10:18:19] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.2.6/ext/php_pgsql.dll' - The specified module could not be found.
in Unknown on line 0

but the files are there and the other extensions are working
i tried to download the php files from php.net and overwrite the ext file didn't work i get the same error

any ideea ?

Options: ReplyQuote
Re: pgsql module not loading
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: August 14, 2008 09:41AM

did u tick the extentsion?

lift click wamp icon goto - php > extentions and tick php_pgsql

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: pgsql module not loading
Posted by: yfastud (Moderator)
Date: August 14, 2008 01:29PM

you have to install PostgreSQL since enable extension only is not enough

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: pgsql module not loading
Posted by: hamish (---.opus.co.nz)
Date: August 15, 2008 01:50AM

I'm experiencing the same issue.

@Steve Martin - yes they're ticked - but ticking the box just makes the module active in PHP.ini. I've check PHP.ini, the paths are correct, the extension_dir is correct, the modules exist. Other modules (eg: GD) have loaded correctly.

@yfastud - do you mean you have to install a postgresql server LOCALLY? I'm trying to connect to a datasource on a different machine. I don't see why you'd need to install a whole database server just to let PHP start up correctly - unless there is a dll included in Postgresql server that WAMP requires. If so, any idea what it is?

At the moment I'm thinking that the pgsql modules included with WAMP are faulty.

These are the messages I'm getting:

[15-Aug-2008 11:38:39] 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

[15-Aug-2008 11:38:39] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.2.6/ext/php_pgsql.dll' - The specified module could not be found.

in Unknown on line 0

[15-Aug-2008 11:38:39] 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

[15-Aug-2008 11:38:39] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.2.6/ext/php_pgsql.dll' - The specified module could not be found.

in Unknown on line 0

Options: ReplyQuote
Re: pgsql module not loading
Posted by: hamish (---.opus.co.nz)
Date: August 15, 2008 01:58AM

Ah, found the issue.

As posted here: [forum.kohanaphp.com]

The bug is in PHP 5.2.6 - downgrade to 5.2.5 to fix the problem.

Options: ReplyQuote
Re: pgsql module not loading
Posted by: aragon612 (---.fbx.proxad.net)
Date: July 12, 2009 07:46AM

Hello,

I had the same problem with PHP 5.3.0 in Wamp 2.0i.

To make it work, I follow instructions found in the "User Contributed Notes" for the Installation/Configuration of PostgreSQL in PHP within the PHP Manual : [www.php.net].

You just have to add this lines into the httpd.conf :

PHPIniDir "Full path to your PHP directory ending with a /"
Loadfile "Full path to your PHP directory ending with a /php5ts.dll"
Loadfile "Full path to your PHP directory ending with a /libpq.dll"

before the LoadModule line :

LoadModule php5_module "Full path to your PHP directory ending with a /php5apache2_2.dll"

I don't need to change the php_pdo_pgsql.dll nor the pgp_pgsql.dll in the PHP extensions directory.

I hope this will be usefull.

Options: ReplyQuote
Re: pgsql module not loading
Posted by: skoobiedu (---.austin.res.rr.com)
Date: December 11, 2009 08:25PM

Apparently no one thought to look in the Apache bin directory (<wamp_dir>\bin\apache\<apache_version>\bin). WAMP stands for Windows, Apache, MySQL, and PHP and as such PostgreSQL isn't taken care of.

'libpq.dll' isn't copied into the Apache bin directory, so enabling the PostgreSQL extensions won't work right away. Copy 'libpq.dll' to the Apache bin directory from the PHP directory (<wamp_dir>\bin\php\<php_version> ). The reason for this is because PHP is loaded as an Apache module, so any dlls that the extensions require need to be copied to the Apache bin directory.

Now, the only problem I have is that the version of 'libpq.dll' included with PHP is 8.3.1, and copying 'libpq.dll' from the PostgreSQL installation doesn't work since the PostgreSQL extensions were compiled against the 8.3.1 version. O_o I guess it's time to compile my own versions. o_O

One last thing, if you want WampServer to copy 'libpq.dll' anytime you switch the Apache/PHP version, then you can add one line to 'config.inc.php' (<wamp_dir>\scripts). NOTE: BACKUP CONFIG.INC.PHP BEFORE MAKING ANY CHANGES.

1. Open 'config.inc.php' in any text editor.
2. Do a search for '$phpDllToCopy' without the single quotes.
3. Add the following at the end of the line that was found in step 2, exactly as written: 'libpq.dll',
--- The edited line should look like the following: $phpDllToCopy = array ( 'libpq.dll',
4. Save 'config.inc.php' and refresh WampServer.

Now, this change won't take affect until you change the Apache/PHP version. So, if you don't use more than one version of each, then this modification is pointless, since it'll never be executed.

DISCLAIMER: I AM NOT RESPONSIBLE FOR ANY DAMAGES THAT MAY OCCUR FROM THE MISCONFIGURATION OF WAMPSERVER, OR FROM MISREADING MY INSTRUCTIONS ABOVE.

Timeless Thoughts of Imagination
-----------------------------------------------------
I am pessimistically optimistic.



Edited 1 time(s). Last edit at 12/11/2009 09:21PM by skoobiedu.

Options: ReplyQuote
Re: pgsql module not loading
Posted by: golden (---.adsl.proxad.net)
Date: January 06, 2010 09:04AM

skoobiedu Wrote:
-------------------------------------------------------
> Copy 'libpq.dll' to the
> Apache bin directory from the PHP directory
> (\bin\php\ ). The reason for this is because PHP
> is loaded as an Apache module, so any dlls that
> the extensions require need to be copied to the
> Apache bin directory.
>
> 1. Open 'config.inc.php' in any text editor.
> 2. Do a search for '$phpDllToCopy' without the
> single quotes.
> 3. Add the following at the end of the line that
> was found in step 2, exactly as written:
> 'libpq.dll',
> --- The edited line should look like the
> following: $phpDllToCopy = array ( 'libpq.dll',
> 4. Save 'config.inc.php' and refresh WampServer.
-------------------------------------------------------

THANKS A LOT winking smiley It's working

Options: ReplyQuote
Re: pgsql module not loading
Posted by: ajaho (---.gale.volia.net)
Date: March 28, 2010 08:34PM

skoobiedu, thank you! It is only one right solution among many others even googled above this.

Options: ReplyQuote
Re: pgsql module not loading
Posted by: traxonja (217.75.194.---)
Date: May 13, 2011 04:23PM

skoobiedu, THANKS MAN!!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.