IIS, perl, and html forms

SlickRoenick

Member
Jul 13, 2005
36
0
0
I don't know when this stopped working. I just know that it isn't working anymore. Something is weird permission-wise and i can't for the life of me, figure it out.

here is what i am troubleshooting with:
Code:
<form id="form1" name="form1" method="post" action="test.pl">
  <label>what
  <input name="what" type="text" id="what" />
  </label>
  <p>
    <label>submit
    <input type="submit" name="Submit" value="Submit" />
    </label>
  </p>
</form>


And here is what i have in my test.pl script:
Code:
#!/usr/bin/perl
#
# fixedredir.cgi

use CGI;
use CGI::Carp qw(carpout fatalsToBrowser);
use Mail::SendEasy;

print "Content-type: text/html\n\n";

########################################################################
#put your HTML code here

print "Success!";
########################################################################

my $cgi = new CGI;

my $what = $cgi->param('what');

if (!$cgi->param('eMailAddr')) {
  $Email_Address="annonymous\@carrollhospitalcenter.org";
  }

my $message =<<EOF;
do this now:  $what
=========================================================================
EOF

  my $status = Mail::SendEasy::send(
  smtp =>  'my.ip.add.ress' ,
  user => 'username' ,
  pass => 'username' ,
  from    => $Email_Address ,
  from_title => $what ,
  reply   => $Email_Address ,
  error   => 'slickusa@mycompany.com' ,
  to      => 'slickusa@mycompany.com' ,
  subject => "script test" ,
  msg     =>  $message ,
  msgid   => "0101" ,
  ) ;

  if (!$status) { Mail::SendEasy::error ;}

I don't think this is an error within the files since parsing is fine (i assume). The problem arises when i click on Submit. I get a "The page cannot be found. HTTP Error 404" every time. On the server, i broke down and gave full control to Everyone group. Within IIS i set .pl files to associate with c:\perl\bin\perl.exe. I don't know what else i am supposed to do. ActivePerl 5.8.8 is installed and i swear it used to work.

 

SlickRoenick

Member
Jul 13, 2005
36
0
0
I've tried them both in the same directory, and i've tried them in separate directories (just changing the location of the .pl within the form).
 

HardTech

Golden Member
Oct 9, 1999
1,203
0
76
your test.pl file should be in the cgi-bin directory, and might need to be changed to a .cgi extension