Re: Connecting to oracle from perl



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)
.



Relevant Pages

  • Re: Connecting to oracle from perl
    ... > I'm piping from procmail to perl where I want to connect to an oracle ... The problem is that this isn't working when I call the script from ... It is often a problem for cronjobs with oracle databases to not set ...
    (comp.lang.perl.misc)
  • Re: receive mails through php
    ... PHP script). ... the mail to a file *and* the command, so when the first try blows ... SOME distros use procmail as a default. ... and a copy to your normal mailbox ...
    (comp.lang.php)
  • thread_killer
    ... For anyone using procmail and has as little patience as I, ... The script could probably stand improvement, ... # thread killing recipe. ... inane postings on Red Hat mailing lists;-) ...
    (Ubuntu)
  • Re: mutt vacation-list issue
    ... There are vacation ... |>>Because there are procmail recipes that do EXACTLY what you are trying to ... Why spend time trying to hack a script that does ... alternative ways to fix any problem, ...
    (comp.unix.sco.misc)
  • Re: Mail client - run a program when receive an email
    ... >> evolution? ... > each email and run a script - the script would parse ... > think the script needs to modify the email nor pass it ... that really is the sort of thing you do in procmail. ...
    (Fedora)