Postgres' DBI(Pg) problem

Поиск
Список
Период
Сортировка
От Nikos Kapsalis
Тема Postgres' DBI(Pg) problem
Дата
Msg-id F39liLRCRoVDkxEbQGR0001b7ed@hotmail.com
обсуждение исходный текст
Список pgsql-general
Hi !
 
I have installed :
 
PostgreSQL 7.0
+ DBI and DBD::Pg

+ the environment vars : LD_LIBRARY_PATH and PGLIB are set to my ./pgsql/lib directory
+ Apache 1.3.22 without "mod_perl" installed
 
When I write a program like :
 
#!/bin/perl -w
 
use DBI;my $dbh, $sth;
$dbh = DBI->connect("dbi:Pg:dbname=researchdb") or die $DBI::errstr;$sth = $dbh->prepare("insert into course
values('$v1','$v2')") or die $DBI::errstr; 
...
...
...
That runs perfect.
 
 
When I am trying to write a CGI script like this which will run under apache :
 

#!/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use DBI;
my $dbh, $sth, $query;
$query = new CGI;
$dbh = DBI->connect("dbi:Pg:dbname=researchdb") or die $DBI::errstr;$sth = $dbh->prepare("insert
into answersvalues('test1', 'test2');") or die $DBI::errstr; 
..
print $query->header( ....
..
..
 
It gives me the following error in the browser.
 
install_driver(Pg) failed: [Thu Nov 15 12:09:30 2001] writeAnswers: [Thu Nov 15 12:09:30 2001] writeAnswers: Can't load
'/usr/lib/perl5/site_perl/i386-linux/auto/DBD/Pg/Pg.so'for module DBD::Pg: File not found at
/usr/lib/perl5/i386-linux/DynaLoader.pmline 169. [Thu Nov 15 12:09:30 2001] writeAnswers: [Thu Nov 15 12:09:30 2001]
writeAnswers:[Thu Nov 15 12:09:30 2001] writeAnswers: [Thu Nov 15 12:09:30 2001] writeAnswers: at (eval 11) line 3
Perhapsa required shared library or dll isn't installed where expected at /home/pcguest/sambaShare/cgi-bin/MR.pm line
12 
 
-- (Just to know : "writeAswers" is a function which calls the "use DBI;" in the "MR.pm" file )
-- Any idea how to solve that problem ?
 Get your FREE download of MSN Explorer at http://explorer.msn.com

В списке pgsql-general по дате отправления:

Предыдущее
От: "Steve Brett"
Дата:
Сообщение: libpq.dll function descriptions ... ?
Следующее
От: J Smith
Дата:
Сообщение: Re: Sourceforge on Oracle? (WAY OT)