DBI - DBD-DB2 Problem - Please help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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
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...

Re: DBI - DBD-DB2 Problem - Please help

Dieter Brensteiner wrote:
Quoted text here. Click to load it

Possibly your web server is running a different version of perl.
Typically it's due to your PATH environment variable being different
from the user running the web server.

If running "perl -v", from your command line doesn't show something
like: "This is perl, v5.8.5...", that's the issue.  The best fix for
that is to install DBD::DB2 using the perl5.8.5 version.

/path/to/bin/perl5.8.5 Makefile.PL

or use CPAN.

Re: DBI - DBD-DB2 Problem - Please help

J. Gleixner schrieb:
Quoted text here. Click to load it

Hi !

The output is:

This is perl, v5.8.5 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com /, the Perl Home Page.

So it is 5.8.5 . I checked already the environment - nothing that i
should miss so far ?

Any other suggestions would be nice


Re: DBI - DBD-DB2 Problem - Please help

Dieter Brensteiner wrote:
Quoted text here. Click to load it

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

Quoted text here. Click to load it

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

(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 /

Site Timeline