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

apache - CGI - mod_perl HELP needed 1

Status
Not open for further replies.

gshirey

Programmer
Apr 11, 2001
12
US
I am working on a Windows 2000 Box and have been trying to get a simple cgi script up and running. Simple enough right? No. Whenever I try to run a simple script, I get an Internal Server Error Page. Upon checking my logs I find the following error "[Thu Aug 16 16:17:35 2001] [error] [client 127.0.0.1] (2)No such file or directory: couldn't spawn child process: e:/apache/cgi-bin/simple.cgi" I'm about positive I have all the configurations set properly within Apache, I think my problem must lie within the Windows command prompt and its permission. So a little investigation tells me that mod_perl should help me solve my problem (since this creates a compiler within apache and would thus leave any windows junk out of the picture.) Only it turns out that I can find no good documentation for installing mod_perl on a windows box. I have tried a couple of times, but can never seem to get the all important mod_perl.so file to be created.

Any help on either resolving my problem without mod_perl, or on installing mod_perl would be greatly appreciated.

Thanks in advance.
 
I tried mod_perl on an NT4 system with no luck. It was half working as you could run some perl scripts ok but form submissions were getting cached and resubmitted with any recent posts.

To get perl working I use activestate's version @ It is self installing so all you have to do is edit your apache conf with directions to the script folder ie ScriptAlias /cgi-bin/ "/apache/cgi-bin/"
and add .pl as a cgi-script. Also you need to tell apache to allow +execCGI in that directory.

So to summarise (Assuming all the applications are installed in the root as c:\perl c:\apache etc):

Install activestate in a directory like c:\perl\ (keep your paths shortname)

In the .conf:

ScriptAlias /cgi-bin/ "/apache/cgi-bin/"
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
<Directory &quot;/apache/cgi-bin/&quot;>
Options +execCGI
Allow from all
</Directory>

Oh and make sure you edit any perl scripts so that the shebang line is correct ie !#/perl/bin/perl You'll find the perl parsing is slightly slow but so what? It ain't runing on FreeBSD!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top