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 | |
by srobinson (Initiate) on Nov 27, 2012 at 17:22 UTC | |
by NetWallah (Canon) on Nov 28, 2012 at 04:13 UTC | |
by srobinson (Initiate) on Nov 29, 2012 at 22:15 UTC | |
by NetWallah (Canon) on Nov 30, 2012 at 04:29 UTC | |
by srobinson (Initiate) on Nov 30, 2012 at 22:39 UTC | |
by NetWallah (Canon) on Dec 01, 2012 at 17:58 UTC | |
|
Back to
Seekers of Perl Wisdom