DBI - DBD-DB2 Problem - Please help

  • Thread starter Dieter Brensteiner
  • Start date
D

Dieter Brensteiner

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

J. Gleixner

Dieter said:
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...

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

or use CPAN.
 
J

Jonathan Leffler

Dieter said:
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.
 
D

Dieter Brennsteiner

J. Gleixner said:
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
etc.

or use CPAN.


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

thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top