Hello,
I'm trying to
get a basic web app running under mod_perl2, using an Oracle database
connection. After I define the environment variables listed below, the
test script works fine from the command line, but fails with the following error
when I try to run it via the web server. If I do not define the
environment variables, I get the same error on the command line as I do from the
web server.
I have tried
different ways of defining the enviroment variables for the script, but nothing
seems to work.
This is the
error that I get from the web server (Apache 2)
[Fri Nov 18 14:15:54 2005] [error] Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: libclntsh.so.9.0:
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 /web/cgi-bin/test/test.pl line 6
Compilation failed in require at /web/cgi-bin/test/test.pl line 6.
BEGIN failed--compilation aborted at /web/cgi-bin/test/test.pl line 6.
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 /web/cgi-bin/test/test.pl line 6
Compilation failed in require at /web/cgi-bin/test/test.pl line 6.
BEGIN failed--compilation aborted at /web/cgi-bin/test/test.pl line 6.
This is and
excerpt from httpd.conf:
SetEnv ORACLE_HOME /u01/app/oracle/product/9.2.0.4
SetEnv ORACLE_USERID foo/[EMAIL PROTECTED]
SetEnv ASSUME_KERNEL 2.4.19
SetEnv LD_LIBRARY_PATH /u01/app/oracle/product/9.2.0.4/lib
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2::compat
PerlModule Apache::DBI
PerlModule Apache::DBI
ScriptAlias /test/ "/web/cgi-bin/test/"
<Directory "/web/cgi-bin/test">
Options +ExecCGI
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
</Directory>
Options +ExecCGI
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
</Directory>
Beginning of test.pl:
#!/usr/bin/perl -w
use strict;
use Apache::DBI;
use DBI;
use DBD::Oracle;
use CGI qw(:standard);
use Text::TagTemplate;
use Storable;
use Apache::DBI;
use DBI;
use DBD::Oracle;
use CGI qw(:standard);
use Text::TagTemplate;
use Storable;
BEGIN
{
$ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.2.0.4';
$ENV{'ORACLE_USERID'} = 'foo/[EMAIL PROTECTED]';
$ENV{'ASSUME_KERNEL'} = '2.4.19';
$ENV{'LD_LIBRARY_PATH'} = '/u01/app/oracle/product/9.2.0.4/lib';
}
{
$ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.2.0.4';
$ENV{'ORACLE_USERID'} = 'foo/[EMAIL PROTECTED]';
$ENV{'ASSUME_KERNEL'} = '2.4.19';
$ENV{'LD_LIBRARY_PATH'} = '/u01/app/oracle/product/9.2.0.4/lib';
}
Any
suggestions?
Thanks,
Steve