Apache, Oracle, Perl DBI Problems
From: Kevin Moore (kmoore_at_esntech.com)
Date: 12/12/03
- Next message: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Previous message: Tim Bunce: "Re: 2nd post: DBD::ODBC slower than Win32::ODBC"
- Next in thread: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Reply: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 11 Dec 2003 16:12:09 -0800 To: "'dbi-users@perl.org'" <dbi-users@perl.org>
Gang,
I'm attempting to write a perl script, callable from a URL, that
connects me to an Oracle 9i database. I've combed the help pages and
think i'm just missing something simple. From what i've read it appears
that my LD_LIBRARY_PATH is not being set correctly. I've set the
LD_LIBRARY_PATH variable in the perl script and installed the DBI
modules. Below is the environment, code snippet, and error message. Any
ideas anyone? Completely lost here. - Kevin
Environment:
Red Hat Linux 9.0
Apache 2.0.40
Apache-DBI-0.91
DBD-Oracle-1.14
DBI-1.35
Code Snippet:
#!/usr/bin/perl -w
use strict "subs";
use Apache::DBI;
use DBI;
use DBD::Oracle;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use CGI::Cookie;
#use Apache::Registry;
package CGIBook::Error;
use vars qw( $dbh $CGI $TABLE $q $r @FIELD_NAMES);
my ( $sth, @row );
@FIELD_NAMES = ("uinp_uname", "uinp_fname", "uinp_lname", "uinp_active",
"uinp_email", "uinp_passwd", "uinp_signup", "last_login",
"conf_passwd");
$TABLE = "webusers";
$ENV{'ORACLE_HOME'} = '/home/oracle/product/9ias';
#$ENV{'LD_LIBRARY_PATH'} = '/home/oracle/product/9ias/lib';
$ENV{'TWO_TASK'} = 'webapp';
$ENV{'LD_RUN_PATH'} =
"/home/oracle/product/9ias/lib:/home/oracle/product/9ias/r
dbms/lib";
LD_LIBRARY_PATH = '/home/oracle/product/9ias/lib';
# $CGI = new CGI();
### Connect To Database
my $dbh = DBI->connect( "dbi:Oracle:WEBAPP.WORLD", "user", "password" , {
PrintError => 0,
RaiseError => 0
} ) or die "Can't connect To Database: $DBI::errstr\n";
Error message:
[error] [client 192.168.1.3] Premature end of script headers: signup.cgi
[Thu Dec 11 16:01:14 2003] [error] [client 192.168.1.3] Can't load
'/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object
file: No such file or directory at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
[Thu Dec 11 16:01:14 2003] [error] [client 192.168.1.3] at
/home/httpd/cgi-bin/signup.cgi line 6
[Thu Dec 11 16:01:14 2003] [error] [client 192.168.1.3] Compilation
failed in require at /home/httpd/cgi-bin/signup.cgi line 6.
[Thu Dec 11 16:01:14 2003] [error] [client 192.168.1.3] BEGIN
failed--compilation aborted at /home/httpd/cgi-bin/signup.cgi line 6.
- Next message: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Previous message: Tim Bunce: "Re: 2nd post: DBD::ODBC slower than Win32::ODBC"
- Next in thread: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Reply: Steve Baldwin: "RE: Apache, Oracle, Perl DBI Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|