Re: Connecting to oracle from perl
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Sun, 24 Jul 2005 05:58:43 +0000 (UTC)
mkrogsru@xxxxxxxxx (Anne-Marte) said:
>I'm piping from procmail to perl where I want to connect to an oracle
>DB. The problem is that this isn't working when I call the script from
>my .procmailrc-file, but it is working nicely when I run the script
>from xterm. The exeption I get looks like this:
>
>install_driver(Oracle) failed: Can't load
>'/local/perl/lib/site_perl/5.6.0/sun4-solaris/auto/DBD/Oracle/Oracle.so'
>for module DBD::Oracle: ld.so.1: /local/perl/bin/perl: fatal:
>libclntsh.so.1.0: open failed: No such file or directory at
>/local/perl/lib/5.6.0/sun4-solaris/DynaLoader.pm line 200.
> at (eval 29) line 3
>Compilation failed in require at (eval 29) line 3.
>Perhaps a required shared library or dll isn't installed where
>expected
> at /ssb/ursus/h1/amk/lib/OracleBase.pm line 49
>procmail: Error while writing to "/perl/DBtest.pl"
>procmail: Program failure (255) of "/perl/DBtest.pl"
>
>Is anyone familiar with this problem??
In your xterm session something is setting the LD_LIBRARY_PATH -variable
for you, which gives your DBD::Oracle driver the requisite information
to find the Oracle client library (libclntsh.so).
When executed through procmail, LD_LIBRARY_PATH is not set, and thus the
client library is not found. Getting LD_LIBRARY_PATH set for procmail
scripts can be tricky, as the scripts may be run setuid, in which case
LD_LIBRARY_PATH is ignored for security reasons.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- References:
- Connecting to oracle from perl
- From: Anne-Marte
- Connecting to oracle from perl
- Prev by Date: FAQ 4.7 How do I multiply matrices?
- Next by Date: Re: posting an array
- Previous by thread: Re: Connecting to oracle from perl
- Next by thread: FAQ 4.14 How can I compare two dates and find the difference?
- Index(es):
Relevant Pages
|