Forum Moderators: mack

Message Too Old, No Replies

Perl program not opening in IE6.0

Simple Perl program

         

TECMiami

5:31 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



The following is my first perl program that I want to run in IE 6.0. I am running Windows 2000 Professional with IIS.

#!/usr/bin/perl
# test.pl
# Displaying a Perl document

use warnings;
use strict;
use CGI qw( :standard );

my $dtd =
"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";

print( header(), start_html( { dtd => $dtd, title => "Test Script" } ),
h1( "This is a Perl document!" ), end_html() );


When I run the program from the IE address line, I receive a File Download dialog box. If I select "Open", the perl program runs in a cmd window which shuts upon completion. When I run the program from a cmd window, I can see that the html rendered is correct.

Any ideas as to why I cannot get the perl program to render in my IE?

bakedjake

5:36 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Is the directory you're running the script from configured with either script or execute access from the IIS admin? Also, make sure .cgi or .pl (which ever extension you're using) is mapped to perl as a MIME type.

panic

5:55 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



#!/usr/bin/perl

Are you sure Perl executes using that directory? I had to download ActiveState Perl when I wanted to run Perl scripts on my Windows machine, but you might not have to with IIS. I'm not real sure, but that could definitely be a problem.

TECMiami

6:02 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



panic - Thank you for responding. I had downloaded ActivePerl and am able to run Perl programs in my cmd window.

bakedjake - Thank you for responding. The virutal directory I created in Webpup does have execute privledges. I am using a .pl extention. How do I map to perl as a MIME type?

bakedjake

5:39 pm on Dec 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



In IIS Admin, right click on the computer name (not the web site name!), and click properties. At the top, you'll see Master Properties: WWW Service. Click edit, then click on the Home Directory tab. At the bottom, in the Application Properties section, click the configuration button.

You'll now be at the App Mapping tab. Ensure that .pl or .cgi (whatever you're using) is mapped to perl.

If it is not, you'll need to add it according to the instructions that came with your perl (the instructions are different for ActiveState than regular perl/win32).