Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Howto hard code ORACLE_HOME in DBD::Oracle Module

1 view
Skip to first unread message

Harald Falkenberg

unread,
Nov 22, 2009, 11:46:17 AM11/22/09
to dbi-...@perl.org
Hello,

due to migration a bulk of perl scripts to another web server, I need to
prepare perl module DBD::Oracle to run properly against oracle databases
although the ORACLE_HOME value has changed.

How and where I can hard code the suitable ORACLE_HOME env variable in the
sources of the DBD::Oracle module?

The module alreadz works fine on the new server, but I cannot reset
ORACLE_HOME in every perl script.

Regards and thank you for your help in advance
Harald

Bruce Johnson

unread,
Nov 23, 2009, 3:03:06 PM11/23/09
to dbi Mailing List

If you're running Apache2 on the new web server you can set
environment variables like ORACLE_HOME via httpd.conf.

This is how we do it.

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

Institutions do not have opinions, merely customs


M. Allan Noah

unread,
Nov 23, 2009, 3:12:21 PM11/23/09
to Bruce Johnson, dbi Mailing List
On Mon, Nov 23, 2009 at 3:03 PM, Bruce Johnson
<joh...@pharmacy.arizona.edu> wrote:
>
> On Nov 22, 2009, at 9:46 AM, Harald Falkenberg wrote:
>
>> Hello,
>>
>> due to migration a bulk of perl scripts to another web server, I need to
>> prepare perl module DBD::Oracle to run properly against oracle databases
>> although the ORACLE_HOME value has changed.
>>
>> How and where I can hard code the suitable ORACLE_HOME env variable in the
>> sources of the DBD::Oracle module?
>>
>> The module alreadz works fine on the new server, but I cannot reset
>> ORACLE_HOME in every perl script.
>>
>> Regards and thank you for your help in advance
>
> If you're running Apache2 on the new web server you can set environment
> variables like ORACLE_HOME via httpd.conf.
>
> This is how we do it.

I have found that sometimes env vars set in http.conf will apply to
the cgi environment, but not to the mod_perl2 'C' environment if you
are using the apache 'worker' MPM. Generally I set such vars in the
apachectl envvars file, and then add a PassEnv statement for them in
httpd.conf.

allan
--
"The truth is an offense, but not a sin"

0 new messages