Re: Error appears in web log but script runs ok on the command line
Bruce Johnson <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
On Oct 18, 2013, at 12:10 PM, Bruce Johnson <[email protected]> wrote: > I'm getting the following error on a newly set-up server: > > [Fri Oct 18 12:02:06 2013] [error] install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.\n at (eval 11) line 3\nCompilation failed in require at (eval 11) line 3.\nPerhaps a required shared library or dll isn't installed where expected\n at /home/webfiles/apply/perl/oratest.pl line 7\n > > > It's a really simple script that just connects to the database: > > #!/usr/bin/perl > use DBI; > use strict; > my $login="xxxxxx"; > my $dbpass='xxxxxx'; > my $dbname="host=xxxxx.xxxx.xxxxx.xxxx;sid=xxxxxx"; > my $lda = DBI->connect("dbi:Oracle:$dbname", $login, $dbpass, {RaiseError =>1}); > print "Content-type: text/html\n\n"; > print "It Works"; > exit; > > > I've confirmed that Apache has the correct LD_LIBRARY_PATH and ORACLE_HOME vars set yet whenever we run the script on the web server we get the error. > > On the command line it's: > > [root@xxxx perl]# perl oratest.pl > Content-type: text/html > > It Works > > > Any ideas? by the way this is DBI v1.628, DBD::ORacle v 1.66, and the latest Oracle instant client for RHEL: oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs