Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

DBI - DBD-DB2 Problem - Please help
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...


Report this thread to moderator Post Follow-up to this message
Old Post
Dieter Brensteiner
06-03-05 01:55 AM


Re: DBI - DBD-DB2 Problem - Please help
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.s
o'
> 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/

Report this thread to moderator Post Follow-up to this message
Old Post
Jonathan Leffler
06-03-05 08:55 AM


Re: DBI - DBD-DB2 Problem - Please help
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{'PATH'} =
'/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{'LD_LIBRARY_PATH'} = '/usr/IBMdb2/V6.1/lib';
$ENV{'DB2DIR'} = '/usr/IBMdb2/V6.1';
$ENV{'DB2INSTANCE'} = 'db2p';
$ENV{'CLASSPATH'} =
'/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:
> 
>
>
> Good - so you know what the correct environment should be.
> 
>
>
> 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.
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Dieter Brennsteiner
06-03-05 08:55 AM


Re: DBI - DBD-DB2 Problem - Please help
Jonathan Leffler schrieb:
> Dieter Brensteiner wrote:
> 
>
>
> Good - so you know what the correct environment should be.
> 
>
>
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Dieter Brennsteiner
06-03-05 01:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:48 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.