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]>
First thing I checked, and they're set correctly;

From %ENV on the broken system:


ORACLE_HOME --> /usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH --> /usr/lib/oracle/12.1/client64/lib


This is the only thing I can think of that could cause this error. I've compared permissions, etc with a working server and I see nothing wrong. The only main difference is that the problem system is running version 12 of the Instant Client and the working one is running 11.2, but that would cause the program to fail on the command line as well.

On Oct 18, 2013, at 12:30 PM, "Furst, Carl" <[email protected]>
 wrote:

> Ld_library_path is getting set in apache configs or wrapper scripts?
> 
> Have you tried setting
> SetEnv LD_LIBRARY_PATH
> 
> In httpd.conf? 
> 
> Or have it set when you call apachectl??
> 
> 
> 
> Carl Furst
> 
> 
> 
> 
> On 10/18/13 3: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?
>> 
>> -- 
>> Bruce Johnson
>> University of Arizona
>> College of Pharmacy
>> Information Technology Group
>> 
>> Institutions do not have opinions, merely customs
>> 
>> 
> 
> 
> 
> 
> 
> 
> **********************************************************
> 
> MLB.com: Where Baseball is Always On

-- 
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.