[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Defining environment variables and cgi scripts

On Sat, 2005-12-03 at 22:15 -0500, Tom Moore wrote:

> I have a cgi script I want apache to execute for me.
> The problem I'm having is I don't know how to include editional 
> environmental variables that the script requires.
> How do I add a variable called PAYMENTIC_HOME to the list of environment 
> variables that perl knows about when executing a script under apache?
> If I define it like:
> export $PAYMENTECH_HOME=/usr/local/paymentech from the shel before I run 
> perl script.cgi everything owrks fine.
> If I run it under apache the system doesn't pass the PAYMENTECH_HOME 
> variable to the script.
> Any ideas how I can get this to work?

Apache doesn't execute the cgi, it just fires off the perl script and
passes it variables.

I'm not sure what you're trying to do, but I'd be inclined to put the
value in a hidden form variable in the HTML, and let the perl script set
the value in the environment. 

Glenn English

Reply to: