Solved

FormMail configuration problems

Posted on 2007-11-16
14
374 Views
Last Modified: 2013-12-18
I have a regular html page which a user inputs some basic information into. This is stored on a Linux machine. This should then get emailed to the administrator once the submit button is pressed. I am using formMail to do this. I am sure I have configured it correctly. The paths to things eg usr/bin/perl are correct and the file permission for the script is set to 755. Ca anyone tell me why then I keep getting the internal server error 500. The html and the script are both below:

<!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"><!-- InstanceBegin template="/Templates/blabl_formpage.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>blabl Transcriber Form</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="../Graphics/mm_health_nutr.css" type="text/css" />
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-family: <ul id="MenuBar1" class="MenuBarHorizontal">         <li><a href="#">Item 1</a> </li>         <li><a href="#">Item 2</a></li>         <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>             <ul>               <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>                   <ul>                     <li><a href="#">Item 3.1.1</a></li>                     <li><a href="#">Item 3.1.2</a></li>                   </ul>               </li>               <li><a href="#">Item 3.2</a></li>               <li><a href="#">Item 3.3</a></li>             </ul>         </li>         <li><a href="#">Item 4</a></li>       </ul>Arial, Helvetica, sans-serif}
-->
</style>

<style type="text/css">
<!--
#apDiv1 {
      position:absolute;
      left:841px;
      top:224px;
      width:40px;
      height:370px;
      z-index:1;
}
#apDiv2 {
      position:absolute;
      left:889px;
      top:211px;
      width:170px;
      height:234px;
      z-index:1;
}
.style5 {
      font-size: 24px;
      color: #607240;
      vertical-align: top;
}
.style6 {
      color: #73142A
}
a:hover {
      color: #A3C96B;
      text-decoration: underline;
}
.style7 {font-size: 36px}
.style8 {
      font-size: 16px;
      padding: 0;
      vertical-align: top;
}
a:link {
      color: #73142A;
      text-decoration: none;
}
a:visited {
      color: #73142A;
      text-decoration: none;
}
a:active {
      color: #73142A;
      text-decoration: none;
}
#apDiv3 {
      position:absolute;
      left:13px;
      top:166px;
      width:135px;
      height:21px;
      z-index:1;
}
#apDiv4 {
      position:absolute;
      left:33px;
      top:166px;
      width:82px;
      height:22px;
      z-index:1;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<meta name="Keywords" content="hooja stuff UK NHS PCT Typing hooja lady outsourcing" />
<meta name="Description" content="hooja stuff outsourcing for UK NHS hooja typing" />
<meta name="blabl hooja stuff" content="blabl UK Based hooja stuff" />
<meta name="Description" content="hooja stuff using UK based hooja typists and hooja ladies for NHS and other healthcare stuff" />
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body bgcolor="#F4FFE4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#D5EDB3">
    <td colspan="2" rowspan="2"><a href="../index.html"><img src="../Graphics/blabl Logo.jpg" alt="blabl Logo" width="143" height="123" hspace="10" vspace="10" border="0" /></a></td>
    <td height="89" colspan="3" align="center" valign="bottom" nowrap="nowrap" id="logo"><div align="left">
      <blockquote>
        <p align="center" class="style7">blabl  hooja stuff</p>
      </blockquote>
    </div></td>
    <td width="101">&nbsp;</td>
  </tr>

  <tr bgcolor="#D5EDB3">
    <td height="71" colspan="3" id="tagline" valign="top" align="center"><div align="left">
      <blockquote>
        <p align="center" class="style8">UK BASED hooja stuff </p>
      </blockquote>
    </div></td>
      <td width="101">&nbsp;</td>
  </tr>

  <tr>
    <td colspan="6" bgcolor="#5C743D"><img src="../Graphics/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

  <tr>
    <td colspan="6" bgcolor="#99CC66" background="../Graphics/mm_dashed_line.gif"><img src="../Graphics/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
  </tr>

  <tr bgcolor="#99CC66">
        <td height="20" colspan="6" class="style1" id="dateformat"><ul id="MenuBar1" class="MenuBarHorizontal">
        <li>
          <div align="center"><a href="../index.html" title="Home">Home</a> </div>
        </li>
        <li><a href="#" title="stuff services offered- choose one of the below" class="MenuBarItemSubmenu">Services</a>
          <ul>
            <li><a href="../NHS Trusts.html" title="stuff services for Trusts and PCTs">NHS Trusts</a></li>
            <li><a href="../Privatepractices.html" title="stuff services for UK private practices">Private Practice</a></li>
          </ul>
        </li>
    <li><a href="#" title="Corporate" class="MenuBarItemSubmenu">Corporate</a>
        <ul>
              <li><a href="../Corporate info.html" title="Company">Company info</a>            </li>
            <li><a href="../Customerlist.html" title="Customers">Customers</a></li>
            <li><a href="../Press.html" title="PR">Press Releases</a></li>
            <li><a href="http://www.blabl.com/news" title="News" target="_blank">News</a></li>
        </ul>
        </li>
        <li><a href="../Gen_Contact.html" title="Contact details" class="MenuBarHorizontal">Contact us</a></li>
        <li><a href="../introfortranscribers.html" title="Information for those wishing to become transcribers">Transcribers</a>        </li>
        </ul>    </td>
  </tr>
  <tr>
    <td colspan="6" bgcolor="#99CC66" background="../Graphics/mm_dashed_line.gif"><img src="../Graphics/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
  </tr>

  <tr>
    <td colspan="6" bgcolor="#5C743D"><img src="../Graphics/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

 <tr>
    <td width="166" height="431"><div align="center" class="subHeader">
      <input type=button value="Back" onClick="history.go(-1)">
    </div></td>
    <td colspan="2" valign="top"><img src="../Graphics/mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />
      &nbsp;<br />
      &nbsp;<br />
      <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="pageName"><!-- InstanceBeginEditable name="Main_title" -->Transcriber's application form<!-- InstanceEndEditable --></td>
            </tr>

            <tr>
          <td class="bodyText"><!-- InstanceBeginEditable name="Main_body" -->
            <p class="main_body">If you would like to apply to become a transcriber on blabl then please fill in the following form.</p>
            <p class="main_body">&nbsp;</p>
            <p class="main_body">Once we have received it, you should receive an emailed response within 24 hours (during the working week). Please do <strong>not</strong> contact us by email or telephone to check that we have received the form until a couple of days have elapsed.</p>
            <p class="main_body">&nbsp;</p>
            <p class="main_body">Note that we only accept applications from experienced hooja ladies- if you have not had extensive hooja stuff experience then please do not apply. We will also require a reference from either a consultant or line manager within a Trust or PCT.</p>
            <p class="main_body">&nbsp;</p>
            <p class="main_body">If we decide to progress your application then we will require a <strong>written</strong> reference from a line manager or consultant within your Trust or PCT. It may be worthwhile organising this now in order to avoid any delays.</p>
            <p class="main_body">&nbsp;</p>
            <p class="main_body">In order to use the system you will need to have a PC and a broadband connection.</p>
            <p class="main_body">&nbsp;</p>
            <form id="form1" name="form1" method="post" action="http://www.blabl.com/cgi-bin/return.pl">
              <table width="100%" border="0" cellpadding="4">
                <tr>
                  <td>Name</td>
                  <td><span id="sprytextfield1">
                    <input type="text" name="NameText" id="NameText" />
                  <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                </tr>
                <tr>
                  <td>Email</td>
                  <td><span id="sprytextfield2">
                  <input type="text" name="EmailText" id="EmailText" />
                  <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                </tr>
                <tr>
                  <td><p>Telephone Number</p>                  </td>
                  <td><span id="sprytextfield3">
                    <input type="text" name="Telephone" id="Telephone" />
                  <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                </tr>
                <tr>
                  <td>Years' experience in hooja typing</td>
                  <td><span id="sprytextfield4">
                    <input type="text" name="Yearsexp" id="Yearsexp" />
                  <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                </tr>
                <tr>
                  <td><p>List the specialities that you have </p>
                  <p>(and the number of years for each)</p></td>
                  <td><textarea name="specs list" id="specs list" cols="45" rows="5"></textarea></td>
                </tr>
                <tr>
                  <td>Comments</td>
                  <td><textarea name="comments" id="comments" cols="45" rows="5"></textarea></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td><input name="submit" type="submit" class="subHeader" id="submit" value="Submit" />
                  <input name="Clearform" type="reset" class="subHeader" id="Clearform" value="Clear" /></td>
                </tr>
              </table>
            </form>
            <p class="main_body">&nbsp;</p>
            <script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email", {validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"]});
//-->
</script>
          <!-- InstanceEndEditable --></td>
        </tr>
      </table>
      &nbsp;<br />
      &nbsp;<br />      </td>
    <td width="50"><img src="../Graphics/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td width="19" valign="top"><br />
            &nbsp;<br /></td>
    <td width="101">&nbsp;</td>
  </tr>
  <tr>
    <td width="166">&nbsp;</td>
    <td width="4">&nbsp;</td>
    <td width="827" class="small_text_bottom"> <p>&nbsp;</p>
      <p>  <a href="javascript:window.print()">Print Page</a> | <a href="http://www.blabllogin.com">Existing users</a>| <a href="Legals.html">Legal</a> | <a href="http://www.blabl.com/news" target="_blank">News</a> | <a href="../Helpcentre/index.html" target="_blank">Helpcenter</a> | <a href="../Gen_Contact.html">Contact us</a></p>
      <p>
    <!-- Google CSE Search Box Begins -->
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_012360755102829816899%3Alhsxeqyfoha"></script>
    <!-- Google CSE Search Box Ends -->

    </p>
    </td>
    <td width="50">&nbsp;</td>
    <td width="19">&nbsp;</td>
      <td width="101">&nbsp;</td>
  </tr>
</table>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>




The script:

#!/usr/bin/perl
#
# NMS FormMail Version 3.14c1
#

use strict;
use vars qw(
  $DEBUGGING $emulate_matts_code $secure %more_config
  $allow_empty_ref $max_recipients $mailprog @referers
  @allow_mail_to @recipients %recipient_alias
  @valid_ENV $date_fmt $style $send_confirmation_mail
  $confirmation_text $locale $charset $no_content
  $double_spacing $wrap_text $wrap_style $postmaster
  $address_style
);

# PROGRAM INFORMATION
# -------------------
# FormMail.pl Version 3.14c1
#
# This program is licensed in the same way as Perl
# itself. You are free to choose between the GNU Public
# License <http://www.gnu.org/licenses/gpl.html>  or
# the Artistic License
# <http://www.perl.com/pub/a/language/misc/Artistic.html>
#
# For help on configuration or installation see the
# README file or the POD documentation at the end of
# this file.

# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
#
BEGIN
{
  $DEBUGGING         = 1;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 1;
  $max_recipients    = 1;
  $mailprog          = '/usr/lib/sendmail -t -i';
  $postmaster        = '';
  @referers          = ();
  @allow_mail_to     = qw(applications@blabla.com);
  @recipients        = (sebastiz@blabla.com);
  %recipient_alias   = ();
  @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  $locale            = '';
  $charset           = 'iso-8859-1';
  $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  $style             = '/css/nms.css';
  $no_content        = 0;
  $double_spacing    = 1;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 0;
  $send_confirmation_mail = 0;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: forms@blabla.com
Subject: Form submission

Thank you for submitting your details.

We will get back to you soon

END_OF_CONFIRMATION
}
0
Comment
Question by:sebastiz
  • 4
  • 3
  • 3
  • +3
14 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 20298638
perhaps teh formMail also needs write, maybe it has to make a temp file before senbding teh mail out?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 20298672
What exactly to do the error logs say?
  -> /var/log/httpd/error_log
    (or whatever you named it in httpd.conf)
0
 

Author Comment

by:sebastiz
ID: 20298788
I've been told that a 755 permission is sufficient..
Because I've got it on shared hosting, I dont have access to the var/log directory
help!


Seb
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 20298850
>>I've been told that a 755 permission is sufficient..
usually it is, changing it was just a suggestion, if you changed it and it worked then the file iswriting and needs write permission, if it still doesn't work then it is another issue
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 20298877
If you don't have access to the log data, then your provider should be a bit more helpful and provide that for you.  It might help the trouble-shooting process.
0
 

Author Comment

by:sebastiz
ID: 20299392
Of course the provider should be more helpful- but are they ever?......
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 28

Expert Comment

by:Jan Springer
ID: 20299474
Yes.  I work with providers and non-response to customer problems is not an option.
0
 

Author Comment

by:sebastiz
ID: 20300454
er.... OK. Well mine isnt. Any suggestions regarding the actual question?
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 20302418
Did you upload the script in ascii or binary mode?

Add this near the beginning of the script and report back with the additional error messages.  That line should output fatal error messages that get placed in the web server error log.

use CGI::Carp qw(fatalsToBrowser);

Open in new window

0
 
LVL 39

Expert Comment

by:Adam314
ID: 20313209
The file should be uploaded in ascii mode.
You could try adding a space after the first line:
#!/usr/bin/perl<SPACE>
This might help if the line endings aren't as expected.
0
 

Author Comment

by:sebastiz
ID: 20337637
Thanks guys. I've sorted the problem out- turns out the script wasnt a script at all was just the top half of it. Reloaded the script and works fine.Can I get the points refunded?
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 20339027
o get your points back go here
http://www.experts-exchange.com/Community_Support/General/
and make a request, takes 4-5 days as they have a followup process
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 25977968
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now