eriklee
asked on
ENV variables question
i have this perl script which checks out a couple of ENV type variables .. why is it that 'SCRIPT_FILENAME' keeps coming back as blank/undefined?
server_name and scriptname is returning fine.
Running Perl5 on NT4 IIS.
------------------------
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<html><head></head><body> \n";
print "Your path is working and pointing to Perl version:<p>\n";
print "<B>$]</B><p>\n";
print "The complete path to this script is:<p>\n";
print "<font color=red><B>$ENV{'SCRIPT_ FILENAME'} </B></font ><p>\n";
print "The relative URL of this script (used in forms) is:<p>\n";
print "<B>$ENV{'SCRIPT_NAME'}</B >\n";
print "Your server returns the following domain name for your site:<p>\n";
print "<B>$ENV{'SERVER_NAME'}</b ><p>\n";
print "</body></html>\n";
exit;
server_name and scriptname is returning fine.
Running Perl5 on NT4 IIS.
------------------------
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<html><head></head><body>
print "Your path is working and pointing to Perl version:<p>\n";
print "<B>$]</B><p>\n";
print "The complete path to this script is:<p>\n";
print "<font color=red><B>$ENV{'SCRIPT_
print "The relative URL of this script (used in forms) is:<p>\n";
print "<B>$ENV{'SCRIPT_NAME'}</B
print "Your server returns the following domain name for your site:<p>\n";
print "<B>$ENV{'SERVER_NAME'}</b
print "</body></html>\n";
exit;
Try $ENV{'SCRIPT_NAME'}
ASKER
erh..actually that one is already in the script. what won't work is SCRIPT_FILENAME.
SCRIPT_FILENAME is not one of the CGI session variables. What data are you hoping to see in SCRIPT_FILENAME? See
http://stein.cshl.org/WWW/software/CGI/#environment
http://stein.cshl.org/WWW/software/CGI/#environment
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks