<html><div style='background-color:'><DIV>Hi !</DIV>
<DIV> </DIV>
<DIV>I have installed :</DIV>
<DIV> </DIV>
<DIV>PostgreSQL 7.0</DIV>
<DIV>+ DBI and DBD::Pg</DIV>
<DIV>
<DIV>+ the environment vars : LD_LIBRARY_PATH and PGLIB are set to my ./pgsql/lib directory</DIV></DIV>
<DIV>+ Apache 1.3.22 without "mod_perl" installed</DIV>
<DIV> </DIV>
<DIV><STRONG>When I write a program like :</STRONG></DIV>
<DIV> </DIV>
<DIV><EM>#!/bin/perl -w</EM></DIV>
<DIV> </DIV>
<DIV><EM>use DBI;<BR>my $dbh, $sth;</EM></DIV>
<DIV><EM>$dbh = DBI->connect("dbi:Pg:dbname=researchdb") or die $DBI::errstr;<BR>$sth = $dbh->prepare("insert into course values('$v1', '$v2')") or die $DBI::errstr;</EM></DIV>
<DIV><EM>...</EM></DIV>
<DIV><EM>...</EM></DIV>
<DIV><EM>...</EM></DIV>
<DIV><STRONG>That runs perfect.</STRONG></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><STRONG>When I am trying to write a CGI script like this which will run under apache : </STRONG></DIV>
<DIV> </DIV>
<DIV>
<DIV><EM>#!/bin/perl -w</EM></DIV>
<DIV><EM>use strict;</EM></DIV>
<DIV><EM>use CGI;</EM></DIV>
<DIV><EM>use CGI::Carp qw(fatalsToBrowser);</EM></DIV>
<DIV><EM>use DBI;</EM></DIV>
<DIV><EM>my $dbh, $sth, $query;</EM></DIV>
<DIV><EM>$query = new CGI;</EM></DIV>
<DIV><EM>$dbh = DBI->connect("dbi:Pg:dbname=researchdb") or die $DBI::errstr;<BR>$sth = $dbh->prepare("insert into answers values('test1', 'test2');") or die $DBI::errstr;</EM></DIV></DIV>
<DIV><EM>..</EM></DIV>
<DIV><EM>print $query->header( ....</EM></DIV>
<DIV><EM>..</EM></DIV>
<DIV><EM>..</EM></DIV>
<DIV> </DIV>
<DIV><STRONG>It gives me the following error in the browser.</STRONG></DIV>
<DIV> </DIV>
<DIV><EM>install_driver(Pg) failed: [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: 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.pm line 169. [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: [Thu Nov 15 12:09:30 2001] <STRONG>writeAnswers</STRONG>: at (eval 11) line 3 Perhaps a required shared library or dll isn't installed where expected at /home/pcguest/sambaShare/cgi-bin/<STRONG>MR.pm </STRONG>line 12 </EM></DIV>
<DIV> </DIV>
<DIV><STRONG>-- (Just to know : "writeAswers" is a function which calls the "use DBI;" in the "MR.pm" file )</STRONG></DIV>
<DIV><STRONG>-- Any idea how to solve that problem ?</STRONG></DIV>
<DIV> </DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>