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

how to get CGI working in Apache1.3 on W2K

Status
Not open for further replies.

new2apache

Programmer
Mar 13, 2002
4
US
I have been trying to look for documentation for getting the CGI working on Apache on a Win2K machine. The error I get in the error.log is

[Wed Mar 13 14:39:46 2002] [error] [client 127.0.0.1] couldn't spawn child process: d:/program files/apache group/apache/cgi-bin/first.pl

I read the documentation provided with Apache but now I doubt if the CGI module is even shipped with this binary of Apache. Can someone please tell me how and where am I going wrong?
Amar
 
Hi,



The first question for win32 cgi is have you got perl installed ? It doesn't come with apache and if you don't have it get hold of it from -->
Then, you need to make sure that the first line of the perl scripts points at the full path of the perl executable, i.e. the shebang line :

#! /usr/bin/perl

(change the '/usr/bin/perl' to the path of the perl exe file)

Try that first - it may be enough because apache is obviously trying to spawn the cgi script which looks hopeful. However, if it still fails your httpd.conf has a problem so revert on that....

Hope this helps
 
to follow up the the same question i run a apache on w2k.

how to make .cgi,.pl executable in htdocs directory ...

now i have put all executable files in cgi-bin directory ...

any help will be more appriciated .

Thanks

$thendal
 
Hi,



You need a global 'Addhandler' in httpd.conf :



AddHandler cgi-script .cgi .pl



and the option 'ExecCGI' to be active in a <directory> container or .htaccess file for the directory concerned :



<Directory /var/
Options ExecCGI

</Directory>





Hope this helps
 
Thanks for the help. I've some more questions though...
So what's &quot;FastCGI&quot;? IS it another way to make the CGI working on APache? If yes, then can someone tell me how?
Thanks
Amar
 
Hi,

Its similar to mod_perl ( - in effect a perl interpreter is loaded permanently into memory so that the normal perl programs are excuted much faster than normal. However, thats just part of what mod_perl can do -->
Fastcgi ( is a more generic solution to the speed aspect - it supports more than just perl howver, e.g. python - but then again theres mod_python ( !

Basically, any of these will be much faster than allowing the operating system to spawn a 'regular' perl (or whatever) script with all the disk i/o and setup time that involves.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top