i need help with perl/cgi, 500 external error? (beginner)?

crims

New member
I am taking a class on perl/cgi, I installed apache for the first time to run some cgi scripts. I am using one our professor coded, just to test my server, and ig et this external 500 error, here is the code:

## Make sure that the path to your copy of perl.exe is entered below. ##
#!C:\ActivePerl\Perl\bin\perl.exe

#ch1samp.cgi

# This program displays a list of items.
# Use the PERL interpreter to test it and then copy it into the cgi-bin folder of Apache to run
# Copy dvcbann.gif into Apache htdocs folder to display image.

## The next line is required for all perl scripts #
print "content-type: text/html\n\n";

#generate html

# Print header body, etc
print "<HTML>";
print "<head><title>Sample script for chapter 1 </title></head>";
print "<body bgcolor=lime>";
print "<h3>Sample script for chapter 1 </h3>";

# Copy dvcbann.gif into Apache htdocs folder. Note single quotes.

print "<img src='../dvcbann.gif'><P>\n";
print "<h2>Top 10 Reasons To Study PERL at DVC</h2>";
print "<ol>";
### Lines will be numbered ###
print "<li>Great Campus</li>";
print "<li>Lots of parking</li>";
print "<li>Low Cost</li>";
print "<li>New Bookstore</li>";
print "<li>On-line Classes</li>";
print "<li>Great Teachers</li>";
print "<li>Lots of Classes</li>";
print "<li>Friendly People</li>";
print "<li>Easy Admission</li>";
print "<li>We Teach PERL</li>";
print "<ol> \n";

print "</body></html>\n";

I type this in to the browser "http://localhost/cgi-bin/ch1samp.cgi"then i get the" internal 500 error"

the file name is correct, i put the image in the htdoc folder.

This is the error i get from the log file:
(9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/ch1samp.cgi
 
Back
Top