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!

CGI-bin support with Apache 1

Status
Not open for further replies.

vcherubini

Programmer
May 29, 2000
527
US
Hello. I have installed Apache on my machine and love it so far. I have a question though. <br><br>I am running Win2K and, like I said above, have Apache working fine. My question is how do I get my CGI scripts to run locally. I placed a simple hello.cgi script within the cgi-bin directory in the apache directory, and it does not seem to work. I have Apache running when I try to do this, and it still fails. What program should I use to open my CGI files. I would assume a web browser.<br><br>Any and all help will be appreciated with this. Thank you.<br><br><br>-Vic
 
One more thing that I forgot to add. What do you have to change within the httpd.conf file? <br><br>I changed the following lines to what I thought was correct:<br><br><FONT FACE=monospace><br><br># AddHandler allows you to map certain file extensions to &quot;handlers&quot;,<br># actions unrelated to filetype. These can be either built into the server<br># or added with the Action command (see below)<br>#<br># If you want to use server side includes, or CGI outside<br># ScriptAliased directories, uncomment the following lines.<br>#<br># To use CGI scripts:<br>#<br>AddHandler cgi-script .cgi<br><br></font><br><br>I would think that that would be correct. I also, previously in the httpd.conf file changed the cgi-bin directory to the cgi-bin directory within the apache directory. <br><br><br>Thanks again in advance.<br><br>-Vic
 
Is the ExecCGI option set ?

Options ExecCGI (or something like that ... view apache docs)
 
Hi Vic,

If I remember well, you should also include (in httpd.conf) your programming language's lib module. I.e. if you use perl you ave to include the mod_perl.c and add its module.

bye! :)
 
I had little trouble getting Perl to work on a Windows NT Server System but I finally gave up on Personal Web Server and have opted for Apache too. Apache also handles SSI better. As with Viktor, I can't get Perl to run either, in spite of following the directions in the Help documents. I am new at this so if something other than that in the documentation needs to be done, how does one do it?

Don
 
Thanks for all the help. I am at school right now, so obviously I can't check it, but I will check it when I can get home.

Thanks for all the help.

-Vic
 
Hi,
I'm running Apache on Win98 and I am also having trouble with running any CGi scripts. When you say to Load the perl module, where should I get the perl mod from? I was unable to locate any module for running perl scripts on the Apache website. Any help would be greatly appreciated,
Ghalib
 
Oh yeah forgot to add that I added the ExecCGI option, and here's my error message:
[Mon Aug 21 15:14:52 2000] [error] [client 127.0.0.1] (2)No such file or directory: couldn't spawn child process: c:/program files/apache group/apache/cgi-bin/survey/survey.cgi

this directory, as well as file, definitely exist
 
To download the perl module, just go to perl.apache.org.

I have done that, I just have no idea on how to install it. Any help would be appreciated.

Thanks.

-Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top