Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Personal Web Server and ActivePERL

I am trying to get PERL CGI working on PWS on Windows 98 and am having the following problem:-

1) I have installed PWS and it works, I created a webserver with root in \My Documents\Webserver and then created a directory for CGI in \My Documents\Webserver\cgi-bin

2)Using the PWS console I went to ADVANCED and then set the properties of cgi-bin to READ EXECUTE and SCRIPTS

3) Next I downloaded ActivePerl and installed it to c:\perl\bin

4) I then edited the registery and set the value of HKEY_LOCAL_MACHINE\System\Current_Control_set\Services\W3svc\Script_map

.pl = c:\perl\bin\perl.exe %s %s

5) I then created the following perl script

print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Perl TEST PAGE</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H3> This is a test<\H3>\n";
print "<\BODY>\n";
print "<\HTML>\n";

called it testing1.pl and saved it in my cgi-bin directory

6) I rebooted the computer, ran my browser and navigated to cgi-bin, when I double click on testing.pl I get the following error message:-

HTTP Error 403
403.1 Forbidden: Execute Access Forbidden

This error can be caused if you try to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

Please contact the Web server's administrator if the problem persists.

7) To test whether this was a directory permissions problem I put a .exe in the directory and it ran fine.

Anybody any ideas where I am going wrong !!

0
davebarter
Asked:
davebarter
1 Solution
 
Patricia Siu-Lai HoCommented:
davebarter, Just a glance for these lines (not closing by / )

print "<H3> This is a test<\H3>\n";
print "<\BODY>\n";
print "<\HTML>\n";

-----
print "<H3> This is a test</H3>\n";
print "</BODY>\n";
print "</HTML>\n";

---------
pslh
0
 
murraysCommented:
It looks like you have set it all up correctly.

However you are attempting to use it incorrectly.

> I rebooted the computer, ran my browser and navigated to cgi-bin, when I double click on testing.pl

When you do this you are using the browser to load this file NOT the web server.

If you wish to invoke this perl script you need to use PWS.

A url of http://127.0.0.1/cgi-bin/testing1.pl should work.

NB check your filename you

>... called it "testing1.pl" and saved >it in my cgi-bin directory

>6) I rebooted the computer, ran my >browser and navigated to cgi-bin, when >I double click on "testing.pl"
0
 
davebarterAuthor Commented:
Sorry I am afraid the problem persists even when typing in the full URL.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now