S
sino74
Hi
I'm been having this error nad can't seem to locate the source of the
problem. I though the the error was the variables but even after
isolating them, the error message:
<<The server encountered an internal error or misconfiguration and was
unable to complete your request.>>
Still shows up. Does any have any idea what the cause is. Any help
would be appreciated.
HTML FILE________________________________________________________
<!-- ** INFORMATION ON THE PAGE ****************************
Page name _________________ : PY_iPass.html
Version ___________________ : 1.2
CSS used __________________ :
http://webcat.mt.cgi.ca/z_class_file/styles.css
Inputs ____________________ :
Outputs ___________________ :
Scripts used ______________ :
****** END OF INFORMATION ON THE PAGE ******************** -->
<html><head>
<!-- These 2 lines must be there for the character set and the Cascaded
Style Sheet -->
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<LINK REL="stylesheet"
HREF="http://webcat.mt.cgi.ca/z_class_file/styles.css" TYPE="TEXT/CSS">
<title>iPass Form</title>
<script LANGUAGE="JavaScript">
<!--
function doUser()
{
document.frmpending.msg2.value = "";
document.frmpending.msg2.value = "\n\tHere is your iPass / VPN
username: " + document.frmpending.user.value;
document.frmpending.msg2.value = document.frmpending.msg2.value +
"\n\tYour iPass / VPN and Token usage costs will be charged to the
following business unit: " + document.frmpending.bu.value + "\n";
}
function doLoad()
{
document.frmpending.msg3.value = "\nThe password to use with your
account is a combination of a PIN and a Token code (from the Token you
will receive soon). To set your PIN, you need to access the following
link : \nhttps://web.globalace.alcan.com/securidtest\n\nThis link is
only accessible from the Pechiney network, if you don't access, please
call the Helpdesk. If you have not already taken the interactive
tutorial for iPass, please go to the following webpage for iPass
training.\nhttp://www.intranet.plastics.pechiney.com/is/User_Audience/Remote_default.htm\n\nYou
can view an iPass User Guide or save it to your desktop for reference
while you are traveling. Click on \"iPass User Guide\" from the Remote
Usage webpage. Then click File, Save As. Give it a name and save it
to your desktop or C:\ drive. It will be saved as an .htm
document.\nhttp://www.intranet.plastics.pechiney.com/is/User_Audience/Remote_Usage/iPass_Usage_Guide.htm\n\nAfter
reviewing the interactive tutorial or User Guide, if you have any
questions about using iPass contact the Help Desk at
1-888-557-3400.\n\n-iPass has been added to your software profile. If
it does not automatically install the next time that you login, please
do the following:";
document.frmpending.msg3.value = document.frmpending.msg3.value +
"\n\n1. Double click on the \"ZenApplication\" icon on your
desktop\n\n2. Double click on the \"All\" icon\n\n3. Now you should
see iPass Install icon, if you double click on the icon, the software
should install.\n\nPlease let us know if the application is
working.\n\nIf we have not heard from you within two business days, we
will assume the install was completed successfully and your ticket will
be closed.\n\n\nSincerely,\nPechiney Americas Help
Desk\n1-888-557-3400\[email protected]";
}
function echeck(str)
{
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if(-1 == str.indexOf("@pechiney.com") && -1 ==
str.indexOf("@alcan.com") && -1 == str.indexOf("@PECHINEY.COM") && -1
== str.indexOf("@ALCAN.COM"))
{
alert("Your email must have a '@pechiney.com' or
'@alcan.com'.");
return false;
}
if (str.indexOf(at)==-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 ||
str.indexOf(at)==lstr)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
str.indexOf(dot)==lstr)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at,(lat+1))!=-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.substring(lat-1,lat)==dot ||
str.substring(lat+1,lat+2)==dot)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot,(lat+2))==-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(" ")!=-1)
{
alert("Invalid E-mail ID")
return false
}
return true
}
function ValidateForm(){
var emailID=document.frmpending.MIN_NUMBER
if ((emailID.value==null)||(emailID.value==""))
{
alert("Please Enter your Email ID")
emailID.focus()
return false
}
if (echeck(emailID.value)==false)
{
emailID.value=""
emailID.focus()
return false
}
return true
}
-->
</script>
</head>
<body >
<FORM name="frmpending"
ACTION="http://webcat.mt.cgi.ca/cgi-bin/xipassfollowup.cgi"
METHOD="post" onSubmit="return ValidateForm();">
<INPUT TYPE="hidden" NAME="TEMPLATE"
VALUE="/img/tnpp-fr/general/outbox/messageConfirmation.html">
<INPUT TYPE="hidden" NAME="EXCEPTION_TEMPLATE"
VALUE="/img/tnpp-fr/imgHtmlException.html">
<INPUT TYPE="HIDDEN" NAME="SMTP_RETURNPATH">
<INPUT TYPE="HIDDEN" NAME="MIN_RETURNPATH">
<INPUT TYPE="HIDDEN" NAME="FROM">
<INPUT TYPE="HIDDEN" NAME="CALLBACK_NUMBER">
<INPUT TYPE="HIDDEN" NAME="STATUS_REQUEST">
<basefont FACE="Arial,Helvetica">
<table width="100%" border="0">
<tr>
<td width="15%">To :</td>
<td width="85%"> <input name="MIN_NUMBER" type="text"
id="MIN_NUMBER" size="50">
</td>
</tr>
<tr>
<td>Subject:</td>
<td><input class="TXTR" name="MESSAGE_SUBJECT" type="text"
id="MESSAGE_SUBJECT" value="iPass Account Creation - Software Push -
Help Desk Ticket: " size="75" readonly="true"></td>
</tr>
<tr>
<td>AR Number:</td>
<td><input name="AR_NUMBER" type="text" id="AR_NUMBER"></td>
</tr>
<tr>
<td>User Name:</td>
<td><input name="user" type="text" id="user" value="" size="75"
onBlur="doUser();"></td>
</tr>
<tr>
<td>Department:</td>
<td><input name="bu" type="text" id="bu" value="" size="75"
onBlur="doUser();"></td>
</tr>
<tr>
<td>Site:</td>
<td><input name="site" type="text" id="site" size="75"></td>
</tr>
<tr>
<td>Group to which the user is assigned:</td>
<td>
<select name="group" id="group">
<option value="py-americas">RSA py-americas</option>
<option value="Neenah Customer Service Shared">RSA Neenah
Customer Service
Shared</option>
<option value="CGI">RSA CGI</option>
<option value="SOHO (Home User)">RSA SOHO (Home
User)</option>
<option value="Akron Shared">RSA Akron Shared</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input name="submit" type="submit" value="submit">
<br><input class="TXTD" name="CAT_PEOPLE" type="text"
value="(e-mail address removed)">
</td>
</tr>
</table>
</form>
</body>
</html>
___________________________________________________________________
CGI Script_________________________________________________________
#!/usr/bin/perl
#
==================================================================
# This script is for to use with the form followup.html
# ==================================================================
# Variables From the Form :
#
# CAT_PEOPLE : (FORM)HelpDesk, client company.
# (SCRIPT)For the field "From" in the e-mail sent.
#
# MIN_NUMBER: (FORM)Email address for message to be sent to.
# (SCRIPT)For the field "To" in the e-mail sent.
#
# MESSAGE_SUBJECT: (FORM) Subject line
# (SCRIPT) For the field "Subject" in the e-mail sent
#
# MESSAGE_BODY : (FORM) TextArea with all information about the case
to sent to support
# (SCRIPT) For the boby, where the text is in the
e-mail sent
#
=======================================================================================
# Others Variables
#
# time, months, days, day, year, timestamp : Not use in this script
# $content : Contains the text Message: to be concatenate with main
text in the body of the mail.
# $formdata : containt pair Key/Value (Key=name of field from the form
field, Value=text in that field)
#
=======================================================================================
# Parameter to setup
#
# #!/usr/bin/perl : Path where perl is locate
# open (MAIL, "|/usr/lib/sendmail -t -i") : Path where sendmail is
locate (to sent e-mail without e-mail client).
#
#
######################
#variable declarations
@time = localtime;
#Date manipulations
($hour, $min, $sec) = sprintf ('%02d:%02d:%02d', $time[2], $time[1],
$time[0]);
@months = qw(January February Mach April May June July August September
October November December);
#Making 2 Scalars
$month = $months[$time[4]];
$day = $time[3];
$year = $time[5] + 1900;
$timestamp = "$day, le $time[3] $month, $year $hour$min$sec";
#read for POST method to $buffer
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair ( @pairs ) {
($key,$val) = split(/=/,$pair);
$key =~ tr/+/ /;
$key =~ s/%([a-fA-F0-9][a-fA-F0-9]) /pack("C",hex($1)) /ge;
$val =~ tr/+/ /;
$val =~ s/%([a-fA-F0-9][a-fA-F0-9]) /pack("C",hex($1)) /ge;
$val =~ s/<!--(.|\n)*-->//g;
$val =~ s/%(..)/pack("c",hex($1))/ge;
if($formdata{$key}){
$formdata{$key} .= ", $val";
}
else{
$formdata{$key} = $val;
}
}
$content="";
print 'Content-type: text/html ', "\n\n";
# Creating the TO, FROM, and SUBJECT fields
#formating email content
if ($formdata{'problem'} =~ "--Veuillez") {
print "<P><center> Vous n'avez pas choisi de contrainte.<BR> No
email has been sent out.</center>";
exit;
}
else {
open (MAIL, "|/usr/lib/sendmail -t -i") || &ErrorMessage;
print MAIL "To: $formdata{'MIN_NUMBER'}\n";
print MAIL "Cc: $formdata{'CAT_PEOPLE'}\n";
print MAIL "From: $formdata{'CAT_PEOPLE'}\n";
print MAIL "Subject: $formdata{'MESSAGE_SUBJECT'}
$formdata{'AR_NUMBER'}\n\n";
print MAIL $content . "The following iPass account was created:\n\nUser
name: $formdata{'user'}\nSite: $formdata{'site'}\nDevision:
$formdata{'bu'}\nGroup to which user is assignd: $formdata{'group'}\n";
close (MAIL);
print "E-mail follow up procedure has been started. The following text
has been e-mailed:<BR><BR>";
print "To: $formdata{'MIN_NUMBER'}<BR>";
print "Cc: $formdata{'CAT_PEOPLE'}<BR>";
print "From: $formdata{'CAT_PEOPLE'}<BR>";
print "Subject: $formdata{'MESSAGE_SUBJECT'}
$formdata{'AR_NUMBER'}<BR><BR>";
print $content . "The following iPass account was created:<BR><BR>User
name: $formdata{'user'}<BR>Site: $formdata{'site'}<BR>Devision:
$formdata{'bu'}<BR>Group to which user is assignd:
$formdata{'group'}<BR>";
sub ErrorMessage {
print "<P>The server has a problem. Aborting script.\n";
exit;
}}
I'm been having this error nad can't seem to locate the source of the
problem. I though the the error was the variables but even after
isolating them, the error message:
<<The server encountered an internal error or misconfiguration and was
unable to complete your request.>>
Still shows up. Does any have any idea what the cause is. Any help
would be appreciated.
HTML FILE________________________________________________________
<!-- ** INFORMATION ON THE PAGE ****************************
Page name _________________ : PY_iPass.html
Version ___________________ : 1.2
CSS used __________________ :
http://webcat.mt.cgi.ca/z_class_file/styles.css
Inputs ____________________ :
Outputs ___________________ :
Scripts used ______________ :
****** END OF INFORMATION ON THE PAGE ******************** -->
<html><head>
<!-- These 2 lines must be there for the character set and the Cascaded
Style Sheet -->
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<LINK REL="stylesheet"
HREF="http://webcat.mt.cgi.ca/z_class_file/styles.css" TYPE="TEXT/CSS">
<title>iPass Form</title>
<script LANGUAGE="JavaScript">
<!--
function doUser()
{
document.frmpending.msg2.value = "";
document.frmpending.msg2.value = "\n\tHere is your iPass / VPN
username: " + document.frmpending.user.value;
document.frmpending.msg2.value = document.frmpending.msg2.value +
"\n\tYour iPass / VPN and Token usage costs will be charged to the
following business unit: " + document.frmpending.bu.value + "\n";
}
function doLoad()
{
document.frmpending.msg3.value = "\nThe password to use with your
account is a combination of a PIN and a Token code (from the Token you
will receive soon). To set your PIN, you need to access the following
link : \nhttps://web.globalace.alcan.com/securidtest\n\nThis link is
only accessible from the Pechiney network, if you don't access, please
call the Helpdesk. If you have not already taken the interactive
tutorial for iPass, please go to the following webpage for iPass
training.\nhttp://www.intranet.plastics.pechiney.com/is/User_Audience/Remote_default.htm\n\nYou
can view an iPass User Guide or save it to your desktop for reference
while you are traveling. Click on \"iPass User Guide\" from the Remote
Usage webpage. Then click File, Save As. Give it a name and save it
to your desktop or C:\ drive. It will be saved as an .htm
document.\nhttp://www.intranet.plastics.pechiney.com/is/User_Audience/Remote_Usage/iPass_Usage_Guide.htm\n\nAfter
reviewing the interactive tutorial or User Guide, if you have any
questions about using iPass contact the Help Desk at
1-888-557-3400.\n\n-iPass has been added to your software profile. If
it does not automatically install the next time that you login, please
do the following:";
document.frmpending.msg3.value = document.frmpending.msg3.value +
"\n\n1. Double click on the \"ZenApplication\" icon on your
desktop\n\n2. Double click on the \"All\" icon\n\n3. Now you should
see iPass Install icon, if you double click on the icon, the software
should install.\n\nPlease let us know if the application is
working.\n\nIf we have not heard from you within two business days, we
will assume the install was completed successfully and your ticket will
be closed.\n\n\nSincerely,\nPechiney Americas Help
Desk\n1-888-557-3400\[email protected]";
}
function echeck(str)
{
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if(-1 == str.indexOf("@pechiney.com") && -1 ==
str.indexOf("@alcan.com") && -1 == str.indexOf("@PECHINEY.COM") && -1
== str.indexOf("@ALCAN.COM"))
{
alert("Your email must have a '@pechiney.com' or
'@alcan.com'.");
return false;
}
if (str.indexOf(at)==-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 ||
str.indexOf(at)==lstr)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
str.indexOf(dot)==lstr)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at,(lat+1))!=-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.substring(lat-1,lat)==dot ||
str.substring(lat+1,lat+2)==dot)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot,(lat+2))==-1)
{
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(" ")!=-1)
{
alert("Invalid E-mail ID")
return false
}
return true
}
function ValidateForm(){
var emailID=document.frmpending.MIN_NUMBER
if ((emailID.value==null)||(emailID.value==""))
{
alert("Please Enter your Email ID")
emailID.focus()
return false
}
if (echeck(emailID.value)==false)
{
emailID.value=""
emailID.focus()
return false
}
return true
}
-->
</script>
</head>
<body >
<FORM name="frmpending"
ACTION="http://webcat.mt.cgi.ca/cgi-bin/xipassfollowup.cgi"
METHOD="post" onSubmit="return ValidateForm();">
<INPUT TYPE="hidden" NAME="TEMPLATE"
VALUE="/img/tnpp-fr/general/outbox/messageConfirmation.html">
<INPUT TYPE="hidden" NAME="EXCEPTION_TEMPLATE"
VALUE="/img/tnpp-fr/imgHtmlException.html">
<INPUT TYPE="HIDDEN" NAME="SMTP_RETURNPATH">
<INPUT TYPE="HIDDEN" NAME="MIN_RETURNPATH">
<INPUT TYPE="HIDDEN" NAME="FROM">
<INPUT TYPE="HIDDEN" NAME="CALLBACK_NUMBER">
<INPUT TYPE="HIDDEN" NAME="STATUS_REQUEST">
<basefont FACE="Arial,Helvetica">
<table width="100%" border="0">
<tr>
<td width="15%">To :</td>
<td width="85%"> <input name="MIN_NUMBER" type="text"
id="MIN_NUMBER" size="50">
</td>
</tr>
<tr>
<td>Subject:</td>
<td><input class="TXTR" name="MESSAGE_SUBJECT" type="text"
id="MESSAGE_SUBJECT" value="iPass Account Creation - Software Push -
Help Desk Ticket: " size="75" readonly="true"></td>
</tr>
<tr>
<td>AR Number:</td>
<td><input name="AR_NUMBER" type="text" id="AR_NUMBER"></td>
</tr>
<tr>
<td>User Name:</td>
<td><input name="user" type="text" id="user" value="" size="75"
onBlur="doUser();"></td>
</tr>
<tr>
<td>Department:</td>
<td><input name="bu" type="text" id="bu" value="" size="75"
onBlur="doUser();"></td>
</tr>
<tr>
<td>Site:</td>
<td><input name="site" type="text" id="site" size="75"></td>
</tr>
<tr>
<td>Group to which the user is assigned:</td>
<td>
<select name="group" id="group">
<option value="py-americas">RSA py-americas</option>
<option value="Neenah Customer Service Shared">RSA Neenah
Customer Service
Shared</option>
<option value="CGI">RSA CGI</option>
<option value="SOHO (Home User)">RSA SOHO (Home
User)</option>
<option value="Akron Shared">RSA Akron Shared</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input name="submit" type="submit" value="submit">
<br><input class="TXTD" name="CAT_PEOPLE" type="text"
value="(e-mail address removed)">
</td>
</tr>
</table>
</form>
</body>
</html>
___________________________________________________________________
CGI Script_________________________________________________________
#!/usr/bin/perl
#
==================================================================
# This script is for to use with the form followup.html
# ==================================================================
# Variables From the Form :
#
# CAT_PEOPLE : (FORM)HelpDesk, client company.
# (SCRIPT)For the field "From" in the e-mail sent.
#
# MIN_NUMBER: (FORM)Email address for message to be sent to.
# (SCRIPT)For the field "To" in the e-mail sent.
#
# MESSAGE_SUBJECT: (FORM) Subject line
# (SCRIPT) For the field "Subject" in the e-mail sent
#
# MESSAGE_BODY : (FORM) TextArea with all information about the case
to sent to support
# (SCRIPT) For the boby, where the text is in the
e-mail sent
#
=======================================================================================
# Others Variables
#
# time, months, days, day, year, timestamp : Not use in this script
# $content : Contains the text Message: to be concatenate with main
text in the body of the mail.
# $formdata : containt pair Key/Value (Key=name of field from the form
field, Value=text in that field)
#
=======================================================================================
# Parameter to setup
#
# #!/usr/bin/perl : Path where perl is locate
# open (MAIL, "|/usr/lib/sendmail -t -i") : Path where sendmail is
locate (to sent e-mail without e-mail client).
#
#
######################
#variable declarations
@time = localtime;
#Date manipulations
($hour, $min, $sec) = sprintf ('%02d:%02d:%02d', $time[2], $time[1],
$time[0]);
@months = qw(January February Mach April May June July August September
October November December);
#Making 2 Scalars
$month = $months[$time[4]];
$day = $time[3];
$year = $time[5] + 1900;
$timestamp = "$day, le $time[3] $month, $year $hour$min$sec";
#read for POST method to $buffer
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair ( @pairs ) {
($key,$val) = split(/=/,$pair);
$key =~ tr/+/ /;
$key =~ s/%([a-fA-F0-9][a-fA-F0-9]) /pack("C",hex($1)) /ge;
$val =~ tr/+/ /;
$val =~ s/%([a-fA-F0-9][a-fA-F0-9]) /pack("C",hex($1)) /ge;
$val =~ s/<!--(.|\n)*-->//g;
$val =~ s/%(..)/pack("c",hex($1))/ge;
if($formdata{$key}){
$formdata{$key} .= ", $val";
}
else{
$formdata{$key} = $val;
}
}
$content="";
print 'Content-type: text/html ', "\n\n";
# Creating the TO, FROM, and SUBJECT fields
#formating email content
if ($formdata{'problem'} =~ "--Veuillez") {
print "<P><center> Vous n'avez pas choisi de contrainte.<BR> No
email has been sent out.</center>";
exit;
}
else {
open (MAIL, "|/usr/lib/sendmail -t -i") || &ErrorMessage;
print MAIL "To: $formdata{'MIN_NUMBER'}\n";
print MAIL "Cc: $formdata{'CAT_PEOPLE'}\n";
print MAIL "From: $formdata{'CAT_PEOPLE'}\n";
print MAIL "Subject: $formdata{'MESSAGE_SUBJECT'}
$formdata{'AR_NUMBER'}\n\n";
print MAIL $content . "The following iPass account was created:\n\nUser
name: $formdata{'user'}\nSite: $formdata{'site'}\nDevision:
$formdata{'bu'}\nGroup to which user is assignd: $formdata{'group'}\n";
close (MAIL);
print "E-mail follow up procedure has been started. The following text
has been e-mailed:<BR><BR>";
print "To: $formdata{'MIN_NUMBER'}<BR>";
print "Cc: $formdata{'CAT_PEOPLE'}<BR>";
print "From: $formdata{'CAT_PEOPLE'}<BR>";
print "Subject: $formdata{'MESSAGE_SUBJECT'}
$formdata{'AR_NUMBER'}<BR><BR>";
print $content . "The following iPass account was created:<BR><BR>User
name: $formdata{'user'}<BR>Site: $formdata{'site'}<BR>Devision:
$formdata{'bu'}<BR>Group to which user is assignd:
$formdata{'group'}<BR>";
sub ErrorMessage {
print "<P>The server has a problem. Aborting script.\n";
exit;
}}