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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$ENV{'DOCUMENT_ROOT'} problem

Status
Not open for further replies.

alan123

MIS
Oct 17, 2002
149
US
I try to set the enviornment variables for a web script, if I use "/usr/local/apache", the script works fine, however if I use "$ENV{'DOCUMENT_ROOT'}", the script doesn't work, what cause the problem?
 
If you're programming in PHP, the array is $_ENV, not $ENV ______________________________________________________________________
TANSTAAFL!
 
This will report all of your ENV vars.
Code:
#!/usr/local/bin/perl
use CGI;
my $o = new CGI;
print $o->header, $o->start_html;
foreach (keys %ENV)
  {
  print qq(KEY: $_ - VAL: $ENV{$_}<br />\n);
  }
print $o->end_html;
'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top