You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Harnish, Joe" <jh...@ci.grand-rapids.mi.us> on 2001/05/10 14:34:30 UTC

Apache Oracle and Perl

When I start getting this error, I can shutdown the httpd server, and the
machine and it will still give this error.  If I wait a while(sometimes
hours, sometimes days) it will come
back.  Sometimes it is a few hours.  Sometimes it is days.  I have installed
Apache::DBI in hopes of a possible fix.  
 
The error I get is:
Software error:

Can't load
'/usr/lib/perl5/site_perl/5.6.0/i386-linux/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.6.0/i386-linux/DynaLoader.pm line
200. at (eval 13) line 3 

For help, please send mail to the webmaster (root@localhost
<ma...@localhost>), giving this error message and the time and date of
the error. 

____________________________________________________________________________
__________________

This is on a Dell running RedHat Linux 7.  The file is there and it readable
by everyone (along with the path to get there).  Is there a way I can
compile it statically?  Because 95% of  my scripts  access the Oracle
Database.  I have put the so files in their proper places.  

I really need to solve this to prove that my choice of using Apache/Perl for
our
development is actually worth it.  Has anyone ever seen this problem?  

Thanks

 

Joe

Re: Apache Oracle and Perl

Posted by Robert Landrum <rl...@capitoladvantage.com>.
At 8:34 AM -0400 5/10/01, Harnish, Joe wrote:
>When I start getting this error, I can shutdown the httpd server, and the
>machine and it will still give this error.  If I wait a 
>while(sometimes hours, sometimes days) it will come
>back.  Sometimes it is a few hours.  Sometimes it is days.  I have installed
>Apache::DBI in hopes of a possible fix. 
>
>The error I get is:
>Software error:
>
>Can't load
>'/usr/lib/perl5/site_perl/5.6.0/i386-linux/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.6.0/i386-linux/DynaLoader.pm line
>200. at (eval 13) line 3
>
>For help, please send mail to the webmaster (root@localhost
><<m...@localhost>), giving this error 
>message and the time and date of
>the error.
>
>____________________________________________________________________________
>__________________
>
>This is on a Dell running RedHat Linux 7.  The file is there and it readable
>by everyone (along with the path to get there).  Is there a way I can
>compile it statically?  Because 95% of  my scripts  access the Oracle
>Database.  I have put the so files in their proper places.

I had a CGI that became a mod perl app and it was doing a chroot.  As 
a CGI, chroot is fine.  As an Apache::Registry script, it will cause 
these errors.

Rob



--
As soon as you make something foolproof, someone will create a better fool.

Re: Apache Oracle and Perl

Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi there,

On Thu, 10 May 2001, Harnish, Joe wrote:

> When I start getting this error, I can shutdown the httpd server, and the
> machine and it will still give this error.  If I wait a while(sometimes
> hours, sometimes days) it will come
> back.  Sometimes it is a few hours.  Sometimes it is days.  I have installed
> Apache::DBI in hopes of a possible fix.  
>  
> The error I get is:
> Software error:
> 
> Can't load
> '/usr/lib/perl5/site_perl/5.6.0/i386-linux/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.6.0/i386-linux/DynaLoader.pm line
> 200. at (eval 13) line 3 


I think I read somewhere that this error sometimes happens as a kind
of catch-all, and doesn't really mean what it says.  I think it can
mean that an executable wouldn't run, or couldn't be found in the
search paths currently in use by the app (and not that it wasn't there).

You seem to have two files in this message, (Oracle.so and libclntsh.so.8.0).
Have you checked both?  There should have a symlink libclntsh.so pointing to
libclntsh.so.8.0 I think.

Have you checked that the paths are correct when this happens?
Check especially LD_LIBRARY_PATH.

HTH

73,
Ged.





RE: Apache Oracle and Perl

Posted by Rob Bloodgood <ro...@empire2.com>.
> When I start getting this error, I can shutdown the httpd server, and the
> machine and it will still give this error. If I wait a while(sometimes
hours,
> sometimes days) it will come
> back. Sometimes it is a few hours. Sometimes it is days. I have installed
> Apache::DBI in hopes of a possible fix.

> The error I get is:
> Software error:
> Can't load
> '/usr/lib/perl5/site_perl/5.6.0/i386-linux/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.6.0/i386-linux/DynaLoader.pm
line

When I see this problem, I automatically think, "Oh, the Oracle libs aren't
being located by the system."  Edit /etc/ld.so.conf and add the value of
$ORACLE_home/lib (the directory that has libclntsh.so.8 in it)
e.g.
/usr/local/oracle/8.1.5/lib

the run /sbin/ldconfig to update Linux's idea of where things are, and stop
and start the server.

ALSO, ensure that ORACLE_HOME is explicitly provided to your perl stuff:

in httpd.conf
PerlPassEnv ORACLE_HOME

THIS CAN BITE YOU! If your httpd startup script doesn't have the oracle
environment loaded, you may have to fix that as well:

at the beginning of /etc/rc.d/init.d/httpd:

# Source function library.
. /etc/rc.d/init.d/functions <!-- original code -->

# Source Oracle environment <!-- you add these lines -->
ORAENV_ASK=NO
ORACLE_SID=stats
. /usr/local/bin/oraenv

# See how we were called. <!-- original code -->
case "$1" in


HTH!

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;