swesque has asked for the wisdom of the Perl Monks concerning the following question:

I want to use Perl to connect to a PostgreSQL 9.1 database

Perl version is: v5.8.8 built for MSWin32-x86-multi-thread

DBI version: 1.609; DBD-Pg is 2.14.1

DBI->connect generates the following error: The ordinal 284 could not be located in the dynamic link library SSLEAY32.dll.

Here's the code:

use DBI; my $dbh = DBI->connect ('dbi:Pg:hostname=192.168.1.75;dbname=finance;host=db.example.com','po +stgres','uvm', {AutoCommit=>1,RaiseError=>1,PrintError=>0}); print "2+2=",$dbh->selectrow_array("SELECT 2+2"),"\n"; exit(0);

Thank you in advance ... GA

Replies are listed 'Best First'.
Re: PostreSQL DBD
by wrog (Friar) on Nov 29, 2014 at 07:09 UTC

    You might want to try DBD::PgPP (the pure perl driver)

    which will sidestep any .dll issues/conflicts involving DBD::Pg (i.e., if it was compiled with a bad/old version of ssleay.dll) or you'll find out that your problem has nothing to do with DBD::Pg and it's some other module that's screwing you.

      Worked on first test with DBD-PgPP!!

      Also found another possible solution with Net::PostgreSQL which I haven't tested yet.

      Will probably proceed with your solution since I am somewhat familier with Perl DBI using ODBC.

      Thank you. -ga
Re: PostreSQL DBD ( ordinal 284 could not be located in the dynamic link library SSLEAY32.dll )
by Anonymous Monk on Nov 29, 2014 at 00:05 UTC
      Thanks for the prompt reply!

      I'm trying to connect from Perl on a Windows machine to a remote PostgreSQL db on Debian. PgAdmin III works from Windows to submit queries to the remote PostgreSQL.

      Will follow your links to see what I can figure out.

      Just wanted to confirm the problems are with my Windows box (where I'm running Perl) and that I don't need to do anything with security or libraries on Debian.

      -ga