logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Dereference environment variables in apache
Author
grafman



Joined: 21 Mar 2007
Posts: 2

PostPosted: Wed 21 Mar '07 16:28    Post subject: Dereference environment variables in apache Reply with quote

I have a 3rd party module that creates an environment variable in apache. I would like to know if there is a way to use that variable as the value of another one as in:

SetEnv NEWVAR OLDVAR

We have a ton of perl scripts that use a key that the 3rd party had for a long time. Now they've changed it and we don't want to change all of our perl code and would rather not use a universal include either.

Any assistance appreciated.

Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 22 Mar '07 10:53    Post subject: Reply with quote

You need to load mod_env.

Syntax: SetEnv env-variable value

SetEnv SPECIAL_PATH /foo/bin

For more details see the docs


Last edited by James Blond on Thu 22 Mar '07 17:10; edited 1 time in total
Back to top
grafman



Joined: 21 Mar 2007
Posts: 2

PostPosted: Thu 22 Mar '07 15:17    Post subject: Reply with quote

Thank you for the answer, however, your it doesn't address the question I'm asking.

I have someone else's module that supplies a variable and I need to change the key name. So using your example the module would give me:

SetEnv SPECIAL_PATH /foo/bin

Now I need to "dereference" SPECIAL_PATH to get to /foo/bin in order to set a new variable name with the same value as SPECIAL_PATH:

SetEnv NEW_SPECIAL_PATH SPECIAL_PATH

giving NEW_SPECIAL_PATH the value of /foo/bin.
Back to top


Reply to topic   Topic: Dereference environment variables in apache View previous topic :: View next topic
Post new topic   Forum Index -> Apache