Re: Error appears in web log but script runs ok on the command line
"Peter J. Holzer" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
On 2013-10-22 19:50:38 +0200, Alexander Foken wrote:
> Just a wild guess:
>
> mod_perl sets %ENV, but *AFTER* loading DBD::Oracle, so the XS part
> of DBD::Oracle won't see the required environment variables. It is
> possible to manipulate %ENV from inside Perl (this includes
> mod_perl) and then load DBD::Oracle, or at least it was possible for
> a long time.
Maybe it's this problem:
http://www.nntp.perl.org/group/perl.dbi.users/2011/01/msg35583.html
> I would try to make mod_perl execute something like the following
> code as early as possible, even before DBI is loaded:
>
> $ENV{'ORACLE_HOME'}='/some/where';
> # maybe set up other Oracle related environment variables
> require DBD::Oracle; # loads the XS part AFTER setting up the environment
You'd have to change LD_LIBRARY_PATH, not just ORACLE_HOME, but if it is
the problem I cited, that doesn't help either because the dynamic loader
won't pick up the changed LD_LIBRARY_PATH. You have to change it before
starting Apache.
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.10 (GNU/Linux) iD8DBQFSZ597MdFfQa64PCwRAgRTAJ9oEQu2cO01CnoNTcRHEvO8emFLyQCeIB4U LB3pqf0EbmN0hs2O/O3YES0= =Bync -----END PGP SIGNATURE-----