[thelist] How do I get Perl CGIs to work locally with Apache under win98?

George Dillon george.dillon at ukonline.co.uk
Wed Dec 6 02:07:10 CST 2000


I want to script and test CGIs written in Perl on my stand-alone before
putting them on my site (the CGI in question is for hit-logging and
analysis).

My local machine runs Windows 98.  I have Apache installed in the default
directory, i.e.
c:/Apache/
and my site (locally) is in
c:/Apache/htdocs/mydomain.com/

I have installed ActivePerl (5.6.0.613 ), again to the default directory:
c:/Perl/
and my DOS path now includes C:/PERL/BIN

Ideally I would like the local script to be the same as it will be on-line,
so it will be called from pages thus:
<!--#exec cgi="/cgi-bin/mylogger.cgi"-->
and will begin thus:
#!/usr/bin/perl
The rest of the script is very simple and largely copied, so I'm fairly sure
it's ok.

I've tried putting the .cgi script in
c:/Apache/cgi-bin/
c:/Apache/htdocs/cgi-bin/
and
c:/Apache/htdocs/mydomain.com/cgi-bin/
but it still won't work.  My Apache error logs say "couldn't spawn child
process:" but I am NOT getting "[an error occurred while processing this
directive]" on the pages, so I'm assuming the .cgi is being found but it
isn't finding Perl.

My guess is I need to change something in my Apache set-up - possibly in
c:/Apache/conf/httpd.conf
but I can't figure it out.

Can anyone help me set this up?

TIA

George






More information about the thelist mailing list