Re: I have a weird issue with a script running under cron

Bruce Johnson <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On Feb 20, 2014, at 4:56 AM, Peter J. Holzer <[email protected]> wrote:

> On 2014-02-19 11:14:30 -0800, Bill Ward wrote:
>> Remember that "use" is a kind of BEGIN block. You have to set the ENV
>> variables in a BEGIN block before the "use" line.
> 
> Also, on several Unix-like systems (including Solaris and Linux/x86_64),
> changing LD_LIBRARY_PATH while a process is running has no effect. So
> this:
> 
>> On Feb 19, 2014 9:23 AM, "Bruce Johnson" <[email protected]>
>> wrote:
> 
>>> $ENV{"ORACLE_HOME"}="/usr/lib/oracle/11.2/client64";
>>> $ENV{"ORACLE_SID"}="phmweb";
>>> $ENV{"LD_LIBRARY_PATH"}="/usr/lib/oracle/11.2/client64/lib";
>>> 
>>> use DBI;
>>> 
> [...]
>>> my $dbh = DBI->connect( "dbi:Oracle:host=$dbhost", $login, $dbpass,
>>>                      { RaiseError => 1 } );
> 
> doesn't work even with a BEGIN {} block around the assignments to %ENV.
> 
> You have to set LD_LIBRARY_PATH in a wrapper script.


Aaaaand I just moved this script from a Linux i686 to a Linux X86_64 system when the trouble started.


"But, soft! what light through yonder hard skull finally breaks!”

Thank you all for your patient assistance.


-- 
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
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.