Re: I have a weird issue with a script running under cron
"Peter J. Holzer" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
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. hp -- _ | Peter J. Holzer | I think we need two definitions: |_|_) | WSR - Softwaredevelopment | 1) The problem the *users* want us to solve | | | und Projektunterstützung | 2) The problem our solution addresses. __/ | [email protected] | -- Phillip Hallam-Baker on spam
signature.asc
(application/pgp-signature, 190 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iD8DBQFTBe18MdFfQa64PCwRApCtAJ92SDyIvdvk9SyOfYitDXM9DFkZNACgnRz9 FMd+09NE2EuKmbv04hVPUGo= =0LUH -----END PGP SIGNATURE-----