running cgi in NT

Alan Stewart astewart at
Tue Feb 6 11:29:19 CST 2001

On 5 Feb 2001, at 18:04, Florez, Nestor wrote:

> ~sdpm~
> OK guys,
> I have not done a cgi in a long time and never on a pc.  I am trying to
> display the environment variables in a web page, but everytime I run it, NT
> ask me to save it or run it.  I say run it and it opens a separate window
> and it runs it.
> I am using apache server.   Has anyone ran into this problem before?

I assume the server is on the NT box also, but it really doesn't 
matter. The server doesn't know that it is a CGI script, so it is 
simply doing a download. The NT browser then offers the choice of 
saving or running.

You need to either put the CGI script into a server directory in 
which Apache considers anything there to be a CGI executable 
(typical default directory is cgi-bin) or configure Apache to treat all 
files of that type to be executable.

If your Apache is an NT binary "out-of-the-box", CGI may not be 
enabled. Check your ScriptAlias and AddHandler directives. Also, 
the ScriptInterpreterSource directive decides whether perl.exe is 
found from the #! line at the beginning of the script (like UNIX) or by 
NT associations (assuming you made one).

 Alan Stewart          )-[]-(           Electronics Engineer
 Code D621           ~        ~         Network Operations
 SPAWARSYSCEN       ~          ~  \     Satellite Communications
 53560 Hull St   ( ~            ~  )    tel (619)524-3625
 San Diego,CA  __|___             /|    fax (619)524-2607
 92152-5001   ^\____/^^^^^^\    __| |_  astewart at

The posting address is: san-diego-pm-list at

List requests should be sent to: majordomo at

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list