Click here to get back home

DBI - DBD-DB2 Problem - Please help

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DBI - DBD-DB2 Problem - Please help Dieter Brensteiner 06-02-2005
Get Chitika Premium
Posted by Dieter Brensteiner on June 2, 2005, 11:07 pm
Please log in for more thread options


Hi !

I can run my index.cgi program without error against a db2 Database from
command line !
There are no errors at all.

When I try to run the index.cgi file on my apache redhat ws4 i get the
following error:

install_driver(DB2) failed: Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /var/www/htdocs/csc/index.cgi line 113


Please can anybody help ? Urgently


thanx guys...



Posted by Jonathan Leffler on June 3, 2005, 6:14 am
Please log in for more thread options


Dieter Brensteiner wrote:
> I can run my index.cgi program without error against a db2 Database from
> command line ! There are no errors at all.

Good - so you know what the correct environment should be.

> When I try to run the index.cgi file on my apache redhat ws4 i get the
> following error:
>
> install_driver(DB2) failed: Can't load
> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
> for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
> such file or directory at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
> at (eval 3) line 3
> Compilation failed in require at (eval 3) line 3.
> Perhaps a required shared library or dll isn't installed where expected
> at /var/www/htdocs/csc/index.cgi line 113
>
>
> Please can anybody help ? Urgently

Most likely, the environment that works on the command line is not
available in the web server environment. Look up the PassEnv and SetEnv
directives.

(The odds that a problem of the form 'it works on the command line and
not via a web server' is caused by faulty environment settings are
astoundingly high; it covers more than 99% of the cases I've seen.)

In case of doubt, write a web page that dumps the environment it
receives. Then compare that with your working environment. The problem
will, most likely, be obvious.


--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/


Posted by Dieter Brennsteiner on June 3, 2005, 9:03 am
Please log in for more thread options


Thankx for ya help so far.

Well that´s what I tought it would be but, we were setting alle
environments in our cgi already:


$ENV =
'/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/home/db2p/sqllib/bin:/home/db2p/sqllib/adm:/home/db2p/sqllib/misc';
$ENV = '/usr/IBMdb2/V6.1/lib';
$ENV = '/usr/IBMdb2/V6.1';
$ENV = 'db2p';
$ENV =
'/home/db2p/sqllib/java/db2java.zip:/home/db2p/sqllib/java/runtime.zip:/home/db2p/sqllib/java/sqlj.zip';


Do we have to set some env in the httpd.conf of our apache ??

Thanx



Jonathan Leffler schrieb:
> Dieter Brensteiner wrote:
>
>> I can run my index.cgi program without error against a db2 Database
>> from command line ! There are no errors at all.
>
>
> Good - so you know what the correct environment should be.
>
>> When I try to run the index.cgi file on my apache redhat ws4 i get the
>> following error:
>>
>> install_driver(DB2) failed: Can't load
>> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
>> for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
>> such file or directory at
>> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
>> at (eval 3) line 3
>> Compilation failed in require at (eval 3) line 3.
>> Perhaps a required shared library or dll isn't installed where expected
>> at /var/www/htdocs/csc/index.cgi line 113
>>
>>
>> Please can anybody help ? Urgently
>
>
> Most likely, the environment that works on the command line is not
> available in the web server environment. Look up the PassEnv and SetEnv
> directives.
>
> (The odds that a problem of the form 'it works on the command line and
> not via a web server' is caused by faulty environment settings are
> astoundingly high; it covers more than 99% of the cases I've seen.)
>
> In case of doubt, write a web page that dumps the environment it
> receives. Then compare that with your working environment. The problem
> will, most likely, be obvious.
>
>


Posted by Dieter Brennsteiner on June 3, 2005, 9:46 am
Please log in for more thread options


Jonathan Leffler schrieb:
> Dieter Brensteiner wrote:
>
>> I can run my index.cgi program without error against a db2 Database
>> from command line ! There are no errors at all.
>
>
> Good - so you know what the correct environment should be.
>
>> When I try to run the index.cgi file on my apache redhat ws4 i get the
>> following error:
>>
>> install_driver(DB2) failed: Can't load
>> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
>> for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
>> such file or directory at
>> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
>> at (eval 3) line 3
>> Compilation failed in require at (eval 3) line 3.
>> Perhaps a required shared library or dll isn't installed where expected
>> at /var/www/htdocs/csc/index.cgi line 113
>>
>>
>> Please can anybody help ? Urgently
>
>
> Most likely, the environment that works on the command line is not
> available in the web server environment. Look up the PassEnv and SetEnv
> directives.
>
> (The odds that a problem of the form 'it works on the command line and
> not via a web server' is caused by faulty environment settings are
> astoundingly high; it covers more than 99% of the cases I've seen.)
>
> In case of doubt, write a web page that dumps the environment it
> receives. Then compare that with your working environment. The problem
> will, most likely, be obvious.
>
>

Thankx for your help, found the error which was the Setenv
LD_LIBRARY_PATH in the httpd.conf.

Thanks again, see ya


Similar ThreadsPosted
Problem with Net::FTP July 21, 2004, 12:40 pm
Net::FTP->problem with put February 28, 2006, 2:11 am
Re: Problem with DBD::DB2 on AIX. September 20, 2006, 2:10 pm
net::telnet problem July 23, 2004, 6:46 pm
Lwp Post Problem September 1, 2004, 4:09 am
DBD-Pg installation problem September 20, 2004, 10:34 pm
SSL LWP Timeout problem September 21, 2004, 2:25 pm
Win32::API problem... May 25, 2005, 5:33 pm
mod_perl2 problem October 3, 2005, 8:02 am
Problem with DBD-mysql November 20, 2004, 2:34 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap