Skip to main content.
home | support | download

Back to List Archive

Re: Got it working on Windows IIS

From: Bill Moseley <moseley(at)>
Date: Fri Jan 16 2004 - 14:20:42 GMT
On Fri, Jan 16, 2004 at 02:06:43AM -0800, Marko Faldix wrote:

> I could suggest the following:
> On both, Apache and IIS  (don't know for PWS or other) there is server
> variable called PATH_TRANSLATED set as full file system path to called cgi
> script, thus in my case it is set
> PATH_TRANSLATED = c:\home\mydir\swish\swish.cgi
> when calling http://localhost/swish/swish.cgi

That's incorrect, according to the standard.  PATH_TRANSLATED is the 
PATH_INFO translated.  PATH_INFO is the *extra* info added to the end of 
a URL after the program name.

What you likely want it SCRIPT_FILENAME.


You could try this on IIS:

moseley@bumby:~/apache$ cat test.cgi
print "content-type: text/plain\n\n";
print "$_ : $ENV{$_}\n" for sort keys %ENV;

moseley(at)not-real.bumby:~/apache$ GET http://localhost/apache/test.cgi | egrep '(PATH_|SCRIPT_FILENAME)'
SCRIPT_FILENAME : /var/www/apache/test.cgi

moseley(at)not-real.bumby:~/apache$ GET http://localhost/apache/test.cgi/ | egrep '(PATH_|SCRIPT_FILENAME)'
SCRIPT_FILENAME : /var/www/apache/test.cgi

moseley(at)not-real.bumby:~/apache$ GET http://localhost/apache/test.cgi/extra/path | egrep '(PATH_|SCRIPT_FILENAME)'
PATH_INFO : /extra/path
PATH_TRANSLATED : /var/www/extra/path
SCRIPT_FILENAME : /var/www/apache/test.cgi

Can you report back what IIS returns?

Bill Moseley
Received on Fri Jan 16 14:59:48 2004