You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Marian Schubert <ma...@gmail.com> on 2008/03/04 14:59:58 UTC

Environment variables problem

Hello,

I'm having problems with ENV variables in my mod_perl scripts. I set
them using PerlSetEnv:
PerlSetEnv ORACLE_HOME "/opt/oracle/product/10.2/client_1"

but my DBI->connect fails with error message about missing
ORACLE_HOME. But when I put this just before connect:

$Data::Dumper::Useqq = 1;
die Dumper($ENV{ORACLE_HOME});

I get $VAR1 = "/opt/oracle/product/10.2/client_1"; in error log file
which is correct but connect still fails.

I found strange solution. If i put this before connect:

$ENV{ORACLE_HOME} = "$ENV{ORACLE_HOME}";

everything works just fine. Any idea why it doesn't work without this line?

cu,
MS