To get around this problem, I created a file with the environment variables set
as I need them for the perl scripts.  I then "require" this file at the
beginning of the script i.e. require("/u01/app/oracle/oracle_env.pl");   I use
this same script for all my perl programs, resetting dynamic variables like
oracle_home in the calling script based on the oratab file.

A sample line in the script would be: $ENV{'ORACLE_BASE'} = "/U01/APP/ORACLE";

susan




"Chen, Ze" <[EMAIL PROTECTED]> on 02/05/2001 12:36:50 PM

To:   [EMAIL PROTECTED]
cc:    (bcc: Susan G White/MN/Unitedmail)
Subject:  How to set up environment variables dynamically




Hi,

My Perl CGI script work from the command line, but, doesn't work under the
httpd. I know it is caused by environment variables/setting ( such as
ORACLE_HOME etc.).  I tried to use BEGIN at the beginning of the script to
set up these environment variables; and tried to use "use lib..." to
prepended these environment variables to the @INC; and tried to use "$ENV"
to set up them... Anyway, I tried everything that I know to solve this
problem, and they are all failed.
The problem is about DBD:ORACLE module(install_driver(Oracle) failed:).

It works fine before the server is changed. I can't find any clue and don't
know what I should do now. I have spend a lot time on this. The user is
waiting for the system to work.

Please help !!!!   Any help is appreciated.


Thank you so much!

Regurds!
Ze Chen




Reply via email to