http://www.perlmonks.org?node_id=1005763

srobinson has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, I have a windows 2003 server with IIS 6.0. I am trying to get strawberry perl to work with pl scripts as CGI. The script I have is #!c:\strawberry\perl\bin\perl.exe use diagnostics; use strict; use CGI; # load CGI routines my $q = new CGI; # create new CGI object print $q->header (-type=>'image/html'), # create the HTTP header $q->start_html('hello world'), # start the HTML $q->h1('hello world'), # level 1 header $q->end_html; # end the HTML If I go to the directory the has this script and run it is produces the following. hello_world.pl Content-Type: image/html; charset=ISO-8859-1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head> <title>hello world</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body>

hello world

</body> </html> But when I call it from IE I get a 404 error. I have an html file in the same directory and when I call it from IE it shows fine. I suspect coniguration issues.

Replies are listed 'Best First'.
Re: Strawberry and IIS not playing well
by NetWallah (Canon) on Nov 26, 2012 at 23:21 UTC
    Have you configured Application pools, and ISAPI modules in IIS ?

    If not, please follow this article on Running Perl on IIS 7. (I realize you have IIS6, but it hasn't changed much)
    You can skip the Activestate part, since you have Strawberry.

                 "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

      Actually the article you gave me, does not help with IIS 6 as 7 is different.
        A little Googling delivers these bitmap-enhanced instructions for IIS6.

                     "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius