Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with attaching perl to IIS

Status
Not open for further replies.

mehring

IS-IT--Management
Mar 9, 2012
1
US
I installed ActivePerl-5.14.2.1402 on Windows Server 2003 running IIS 6 and Perl seems to be just fine I can run a simple hello world script through command prompt and it outputs fine. However I cannot get it working through web browser. I followed a couple of tutorials found here


but whenever I go to access a simple hello world program in my web browser I either get 500 internal server error or internet explorer cannot view this website depending on my configuration (the tutorials had a few different configuration options). here is the code I am trying to run in my browser by the way.

-------code---------
#!C:\Perl\bin\perl.exe
use CGI qw:)standard);
print header();
print start_html();
print "test";
print end_html();
--------------------
 
your shebang looks a bit odd to me...plus turn on error handling.

Code:
#!/usr/bin/perl

######################
# Set Error Trapping #
######################

use CGI::Carp qw(fatalsToBrowser warningsToBrowser); 
use warnings;
use strict;

print "Content-type: text/html\n\n";
print '<h2>this is a test<h2>';
exit();

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top