Re: Error appears in web log but script runs ok on the command line

"Furst, Carl" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CE87041E.49ECC%[email protected]>
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
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.