Loading ...
Sorry, an error occurred while loading the content.

formmail is broken

Expand Messages
  • mirate
    This is a website I designed a few years ago. The CONTACT and EMAIL SUBSCRIBE forms used to work, and they are broken. When I click on the Submit button, I get
    Message 1 of 4 , Feb 14, 2012
    • 0 Attachment
      This is a website I designed a few years ago. The CONTACT and EMAIL SUBSCRIBE forms used to work, and they are broken.

      When I click on the Submit button, I get a server error saying "The server encountered an internal error or misconfiguration and was unable to complete your request." I don't see what I'm doing wrong.

      These are links to the pages, followed by the relevant snippets.
      http://roxburyyouthworks.org/pages/contact_test.html
      http://roxburyyouthworks.org/pages/email_test.html

      This is a link to the formmail file. This file does reside in the cgi-bin folder where it belongs, but I put a copy here so that you could see it.
      http://roxburyyouthworks.org/pdf/formmail.pl

      This is the code at the beginning of the form section of the HTML page.

      <form action="../cgi-bin/formmail.pl" method="post" name="email" id="email">
      <table width="418" border="0" cellpadding="5" cellspacing="0" id="emailtable">
      <input type="hidden" name="subject" value="email list subscribe">
      <input type="hidden" name="recipient" value="info@...","info@...">
      <input type="hidden" name="redirect" value="http://www.roxburyyouthworks.org/pages/thankyou.html">


      Thanks!
    • mirate
      This is a website I designed a few years ago. The CONTACT and EMAIL SUBSCRIBE forms used to work, and they are broken. When I click on the Submit button, I get
      Message 2 of 4 , Feb 14, 2012
      • 0 Attachment
        This is a website I designed a few years ago. The CONTACT and EMAIL SUBSCRIBE forms used to work, and they are broken.

        When I click on the Submit button, I get a server error saying "The server encountered an internal error or misconfiguration and was unable to complete your request." I don't see what I'm doing wrong.

        These are links to the pages, followed by the relevant snippets.
        http://roxburyyouthworks.org/pages/contact_test.html
        http://roxburyyouthworks.org/pages/email_test.html

        This is a link to the formmail file. This file does reside in the cgi-bin folder where it belongs, but I put a copy here so that you could see it.
        http://roxburyyouthworks.org/pdf/formmail.pl

        This is the code at the beginning of the form section of the HTML page.

        <form action="../cgi-bin/formmail.pl" method="post" name="email" id="email">
        <table width="418" border="0" cellpadding="5" cellspacing="0" id="emailtable">
        <input type="hidden" name="subject" value="email list subscribe">
        <input type="hidden" name="recipient" value="info@...","info@...">
        <input type="hidden" name="redirect" value="http://www.roxburyyouthworks.org/pages/thankyou.html">


        Thanks!
      • David Precious
        On Tue, 14 Feb 2012 14:21:16 -0000 ... Look in your web server s error_log or similar log file for clues as to what s going wrong. First, though, I d very
        Message 3 of 4 , Feb 14, 2012
        • 0 Attachment
          On Tue, 14 Feb 2012 14:21:16 -0000
          "mirate" <talk@...> wrote:

          > This is a website I designed a few years ago. The CONTACT and EMAIL
          > SUBSCRIBE forms used to work, and they are broken.
          > When I click on the Submit button, I get a server error saying "The
          > server encountered an internal error or misconfiguration and was
          > unable to complete your request." I don't see what I'm doing wrong.

          Look in your web server's error_log or similar log file for clues as to
          what's going wrong.

          First, though, I'd very strongly suggest replacing that formmail script
          from Matt's Script Archive with a drop-in replacement from the nms
          project at: http://nms-cgi.sourceforge.net/

          The original script is badly written and insecure.

          As to why the original script isn't working, when I downloaded it I got
          extra characters before the shebang line - that's likely the problem.

          Grab yourself a drop-in replacement FormMail script from the nms
          project at the link above, and copy it into your cgi-bin directory,
          make minor configuration changes if required, and you should be good to
          go.

          If not, consult your server's error log for more information.


          --
          David Precious ("bigpresh") <davidp@...>
          http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter
          www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
          www.preshweb.co.uk/cpan www.preshweb.co.uk/github
        • Nicky McCatty
          Hi David, I changed the shebang line in the original Matt s script, but still got the config error. Then I uploaded the NMS version after altering @referers,
          Message 4 of 4 , Feb 14, 2012
          • 0 Attachment
            Hi David,

            I changed the shebang line in the original Matt's script, but still got the config error.
            Then I uploaded the NMS version after altering @referers, @recipients, and @allow_mail_to, and received the same error.
            After that, I uploaded a virgin copy, but the error persisted.

            Next, I looked up the error log. It indicated that my form code was truncated.

            > [Tue Feb 14 08:57:46 2012] [error] [client 108.14.203.159] Unrecognized character \\x9C at formmail.pl line 752., referer: http://roxburyyouthworks.org/pages/email_test.html
            > [Tue Feb 14 08:57:46 2012] [error] [client 108.14.203.159] Premature end of script headers: formmail.pl, referer: http://roxburyyouthworks.org/pages/email_test.html
            > [Tue Feb 14 09:00:51 2012] [error] [client 108.14.203.159] Unrecognized character \\x9C at formmail.pl line 752., referer: http://roxburyyouthworks.org/pages/email_test.html
            > [Tue Feb 14 09:00:51 2012] [error] [client 108.14.203.159] Premature end of script headers: formmail.pl, referer: http://roxburyyouthworks.org/pages/email_test.html

            I couldn't see what was missing, so I inserted a new form. Now, finally, the form is working, but there is one thing I would like to change. When the user clicks SUBMIT, the result is a page made by formmail. What I want is to get my existing thankyou page: http://roxburyyouthworks.org/pages/thankyou.html.

            I tried placing the desired URL in each of the two possible lines below, but both incurred a misconfig error. Where can I add or alter the code to get my own thankyou page?

            > # You may need to uncomment the line below and adjust the path.
            > # use lib './lib';
            >
            > # USER CUSTOMISATION SECTION
            > # --------------------------
            > # Place any custom code here

            Thanks,
            Nicky






            > On Tue, 14 Feb 2012 14:21:16 -0000
            > "mirate" <talk@...> wrote:
            >
            > > This is a website I designed a few years ago. The CONTACT and EMAIL
            > > SUBSCRIBE forms used to work, and they are broken.
            > > When I click on the Submit button, I get a server error saying "The
            > > server encountered an internal error or misconfiguration and was
            > > unable to complete your request." I don't see what I'm doing wrong.
            >
            > Look in your web server's error_log or similar log file for clues as to
            > what's going wrong.
            >
            > First, though, I'd very strongly suggest replacing that formmail script
            > from Matt's Script Archive with a drop-in replacement from the nms
            > project at: http://nms-cgi.sourceforge.net/
            >
            > The original script is badly written and insecure.
            >
            > As to why the original script isn't working, when I downloaded it I got
            > extra characters before the shebang line - that's likely the problem.
            >
            > Grab yourself a drop-in replacement FormMail script from the nms
            > project at the link above, and copy it into your cgi-bin directory,
            > make minor configuration changes if required, and you should be good to
            > go.
            >
            > If not, consult your server's error log for more information.
            >
            > --
            > David Precious ("bigpresh") <davidp@...>
            > http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter
            > www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
            > www.preshweb.co.uk/cpan www.preshweb.co.uk/github

            Nicky McCatty
            signify | Design
            fusing image & information
            talk@... | www.signifydesign.com





            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.