Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting HTTP Environment variables set in httpd.conf

Status
Not open for further replies.

Haazi2

Programmer
Aug 25, 2000
51
US
I have a server with Apache using mod perl. say I have the following in the httpd.conf

ScriptAlias /mytrading/cgi-bin/ /web/myorders/mytrading/cgi-bin
#Variables needed by GetFrames
SetEnvIf Request_URI /mytrading REMOTE_FIRM=MY
SetEnvIf Request_URI /mytrading User_Firm_Name=MYT



How do I access these environment variables in a perl script. Thanks for any help in advance.
 
The perl script should be able to access these
values using the %ENV hash.

For example:
Code:
print &quot;<B>Welcome</B><BR>&quot; if ($ENV{'REMOTE_FIRM'} eq &quot;MY&quot;);
my $firm = $ENV{'User_Firm_Name'};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top