[ale] Any DBI Oracle guys out there?

David Muse david.muse at firstworks.com
Tue Jan 18 13:42:37 EST 2005


John,

It looks like libclntsh.so.9.0 may not in the LD_LIBRARY_PATH that
apache sees when it starts up.  When Apache runs your script, it tries
to load the oracle module, the module tries to load libclntsh.so.9.0, it
can't because it's not in Apache's LD_LIBRARY_PATH.

You can fix this one of 2 ways:

* add $ORACLE_HOME/lib to /etc/ld.so.conf (note that you cannot just use
$ORACLE_HOME, rather you'll have to use the actual directory name)
* add LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
early in the script that starts apache

It probably works from the command line because you have
$ORACLE_HOME/lib in your LD_LIBRARY_PATH.  Perhaps you set it in your
.bashrc or it gets set in /etc/bashrc.

Processes that get started at boot up don't source /etc/bashrc or any
particular user's .bashrc (or /etc/profile or any particular user's
.profile either) unless their startup script explicitly does it.  As a
result, they lack whatever paths were added to PATH or LD_LIBRARY_PATH
in those rc files.

Give it a try, let me know how it goes.

David Muse
david.muse at firstworks.com

On Tue, 18 Jan 2005 12:04:39 -0500
Armsby John-G16665 <John.Armsby at motorola.com> wrote:

> I have a little test script which runs from the shell "perl
> testOracleObject.pl"  It uses DBI successfully and prints a few
> records
to the screen. No warnings, works great.
>  
> I take the same script, add a little html stuff... and run it directly
> as a url from cgi-bin
> 
> print"content-type: text/html\n\n";
> print("<html><body>");
>  
> http://ga25web04.wepd.mot.com/cgi-bin/testOracleObject.pl
> <http://ga25web04.wepd.mot.com/cgi-bin/testOracleObject.pl> 
>  
> and APACHE 2.0.46 blows up.
>  
> Any ideas??  I am stumped.  Next thing to do is post to perl guys.....
>  
> John
>  
>  
>  
> [Tue Jan 18 11:41:44 2005] [error] [client 155.102.104.81]
> install_driver(Oracle) failed: Can't load
> '/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBD/Orac
> le/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.0/i386-linux-thread-multi/DynaLoader.pm line
> 229.[Tue Jan 18 11:41:44 2005] [error] [client 155.102.104.81]  at
> (eval 1) line 3[Tue Jan 18 11:41:44 2005] [error] [client
> 155.102.104.81] Compilation failed in require at (eval 1) line 3.[Tue
> Jan 18 11:41:44 2005] [error] [client 155.102.104.81] Perhaps a
> required shared library or dll isn't installed where expected[Tue Jan
> 18 11:41:44 2005] [error] [client 155.102.104.81]  at
> oracleConnectionObject.pm line 54



More information about the Ale mailing list