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

cgi script execution - registry problem?

Status
Not open for further replies.

MMage

Programmer
Apr 29, 2002
15
US
I have been trying to get my cgi programs to work in apache for a few weeks now and I have come up against problem after problem. Yesterday I unccommented the ScriptInterpreterSource registry and it stopped giving me the 500 internal server error: unable to spawn child proccess.

Now however when I submit the form it never goes to the cgi generated page it just remains at the form.

I tested the program in DOS and the program gave the content header.

I am wondering if I made a mistake when associating it in the registry. I am using perl as the language, running Windows 98. and apache 1.3.

Any help you can offer would be greatly appreciated.
 
Hi mate,

Make sure that the associations of the files are correct.

When you look at a .pl script on your machine, what does the icon look like?

It should be a little yellow circle, if not then change the file to open with "Perl Command Line Interpreter" and chooose to "always use this program to open these files".

Hope this helps Wullie

 
I have the same problem as MMage. I get the following server error when trying to access a CGI program from my apache webserver:
couldn't create child process: 22503: C:/Program Files/Apache Group/Apache2/cgi-bin/iBtest.cgi

I have done nothing to the program what so ever, just installed it on windows xp and put the iBtest.cgi in the directory. I'm using Apache/2.0.35 (Win32. I'm trying to run a propper cgi script from ikonboards website, so it works perfect.

thanks
 
I tried starting over and wen to the original configuration.

I first enable the addhander for cgi:

Add handler cgi-bin .cgi .pl

That got rid of the 500 server error. To keep it from giving me a 404 I made a relative path from the file(test.html), located in my document root, like this: "../cgi-bin/test.pl" And enabled Options ExecCGI in the Script Aliased directory.

Now it is giving me a would you like to save to the disk message.

I recall seeing something similar in an earlier string and I'm going to search through that, in the mean time does this give you any clues as to what my problem is.

P.S. I originally had my cgi-bin directory within my document root: documentroot /website/
my Script Alias for cgi-bin: /website/cgi-bin.
 
Sorry, its a no go. I reinstalled both apache and perl, changed the same things and it gives me the same output as before.

I just need a server that will allow me to process cgi files. Is there a server that is compatible with windows 98 that will allow me to specify my document root and cgi-bin area through a wizard no interaction with the config files?
 
I just upgraded from 1.??? to 2.0.39 and had the same problem. I took these commands out of my old httpd.conf. Someone please let me know if I am creating a vulnerablility doing this.

I added a shebang for my perl executable just above the ScriptInterpreterSource registry command.
Ex:

#!c:/perl/perl.exe
ScriptInterpreterSource registry

Note: there are three (3) leading spaces in front of the shebang #!c:/perl/perl.exe. Also, make sure your path is adjusted as necessary for your perl.exe location.
 
tim1962,

The shebang line that you have specified does not affect Apache in any way, it will not read that line.

#!c:/perl/perl.exe

Because of the #, apache takes this as a comment and iginores it. You could specify ANY path in that line and it would still work the same.

The reason that it is working for you is that you are now using the registry to parse the files rather than apache looking for the shebang line in the scripts.

Hope this helps Wullie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top