+ Reply to Thread
Results 1 to 6 of 6

Thread: An Error occured while processing the form

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    Unhappy An Error occured while processing the form

    I have a site published on two IIS servers 6.0 on a load balance configuration. I am hosting these two servers
    I installed the latest version of PHP 5.3.5 and the formmail.php 8.24.
    I did the configuration and I am having problem processing the forms I get the following
    "An error occurred while processing the form .

    Please contact us (www.onlyfastrack.com) directly since this form is not working .
    www.onlyfastrack.com apologizes for any inconvenience this error may have caused. "

    the form alert and I get "FAILED to send alert message. Check your server error logs." So nothing seems to be working.

    I need help Fast. By the way I just purchased 7 days support, but it is unclear how to access that support. maybe it is just trough the forum

    The form
    -------
    <form method="POST" action="php_script/formmail.php" name="ContactForm">
    <input type="hidden" name="recipients" value="myName@myserver.com" />
    <input type="hidden" name="required" value="" />
    <input type="hidden" name="subject" value="Email from www.onlyfastrack Contact Page" />

    <p><strong><font size="2">What kind of comment would you like to send?</font></strong></p>
    <dl>
    <dd>
    <input type="radio" name="MessageType" value="Suggestion" /><font size="2">Suggestion
    </font>
    <input type="radio" name="MessageType" value="Praise" /><font size="2">Praise
    </font>
    <input type="radio" name="MessageType" value="Praise" /><font size="2">Inquiry
    </font><input type="radio" name="MessageType" value="Complaint" /><font size="2">Complaint
    </font>
    <input type="radio" name="MessageType" value="Problem2" /><font size="2">Problem
    </font>
    </dd>
    </dl>
    ....
    Configuration section
    _________

    define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!
    /* Help: http://www.tectite.com/fmdoc/target_email.php */
    $TARGET_EMAIL = array(EMAIL_NAME."@fastrk\.com$");
    /* Help: http://www.tectite.com/fmdoc/def_alert.php */
    define("DEF_ALERT","myuser@fastrk.com");

    testmail.php fails and testmail2.php also fails.
    Do I need to install anything else in these servers? SMTP?
    I just checked both servers have SMTP loaded and running
    Last edited by jose; 02-Feb-2011 at 08:21 PM. Reason: updating information

  2. #2
    Join Date
    Dec 2003
    Posts
    3,907

    Default Re: An Error occured while processing the form

    Hi,

    It's likely that PHP isn't setup correctly to send email at all.

    If you have access to your "php.ini" file, you need to make some settings. Here's an example of those settings:
    Code:
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    ; http://php.net/smtp-port
    smtp_port = 25
    
    ; For Win32 only.
    ; http://php.net/sendmail-from
    sendmail_from = admin@myserver.co
    Have a look at your php.ini file and let me know if you need further advice.

    If you don't have access to php.ini, then your hosting provider is responsible for making these settings.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Feb 2011
    Posts
    3

    Unhappy Re: An Error occured while processing the form

    thank you for the reply. I have made the necessary changes. Theo the only parameter I changed was the send_mail_from setting and I changed the SMTP to the IP address of the server
    mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = 192.168.50.148
    ; http://php.net/smtp-port
    smtp_port = 25
    ; For Win32 only.
    ; http://php.net/sendmail-from
    sendmail_from = username@fastrk.com


    does the domain for user email matters?

    SMTP is enabled on that server and I added the FTWEB2\IUSR_FTWEB2 to the security but the mail still fails.I have tried to change the SMTP = FTWEB2 instead but the email does not goes out.
    values from phpinfo()
    SMTP ftweb2 ftweb2
    smtp_port 25 25

    Internal Sendmail Support for Windows enabled
    if you need access to the server(s) I would be more than glad to provide it to you off line of course


    I found this on the php-errors.log
    [02-Feb-2011 16:21:16] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail.php on line 5
    [02-Feb-2011 16:21:27] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail2.php on line 5
    [02-Feb-2011 16:21:35] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail2.php on line 5

    I am not sure what this means and what I need to modify
    Last edited by jose; 02-Feb-2011 at 10:46 PM. Reason: additional info

  4. #4
    Join Date
    Dec 2003
    Posts
    3,907

    Default Re: An Error occured while processing the form

    Hi,

    sendmail_from = username@fastrk.com

    does the domain for user email matters?
    It may do. If this From user doesn't match the domain the server is in, then the email system may decide that it shouldn't send the email. (The messages below seem to confirm this.)

    I found this on the php-errors.log
    [02-Feb-2011 16:21:16] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail.php on line 5
    [02-Feb-2011 16:21:27] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail2.php on line 5
    [02-Feb-2011 16:21:35] PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for username@fastrk.com in D:\testsite\testmail2.php on line 5
    I think this confirms the problem. It's basically saying that "username@fastrk.com" is not within the server's domain, and, therefore, it's refusing to send mail from that email address.

    The above information means I think you're quite close - the email system is seeing the mail going out from PHP and then deciding not to send it.

    I guess you're hosting fastrk.com within this server. But the server is in it's own domain, so you want to be sending From a real email address within that domain, at least initially.

    There may be a setting in your email system that allows you to specify other domains for which it will relay. In this case, add "fastrk.com" to that list.

    Since you've purchased a Windows license, that should entitle you to support from Microsoft for setting up the email system.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Feb 2011
    Posts
    3

    Default Re: An Error occured while processing the form

    OK I seem to be getting a lot further I was able to send mail from testmail.php sucessfully and received the mail test into my local system. I had to setup the virtual SMTP server with a new remote domain to relay the email to the smart domain. So after I got that I was home free...or so I thought. Now From my own site's form https://www.onlyfastrack.com/contact.htm when I submit the form I get the following message
    The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access
    and the page on the address bar is https://www.onlyfastrack.com/php_script/formmail.php
    so I am thinking that there might be an issue with PHP when I am accessing the site from the outside world. PHP seems to be working when I am at the actual server.
    because while the phpinfo script works when I run the browser from the server itself, it does not work when I do it from outside.
    https://www.onlyfastrack.com/php_script/phpinfo.php
    maybe it is because of the https protocol?
    Any Ideas?
    Let me know if you need a copy of the form or any other file to check out my configuration. Remember that I have two servers on a load balance setup, but the site , and the configurations are identical on both servers.
    Last edited by jose; 03-Feb-2011 at 04:27 AM. Reason: add additional info

  6. #6
    Join Date
    Dec 2003
    Posts
    3,907

    Default Re: An Error occured while processing the form

    Hi,

    No, this is straight web server configuration - should be easy.

    Somewhere in IIS (I think that's what you're using) you can configure the methods by which browsers can access the server.

    The normal method is GET.

    For forms, you generally want POST. You'll see method="POST" in your <form> tag. You can change it to GET, but POST is the recommend method for forms.

    So, you need to find where you control this for IIS.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. "Error while processing the form [M23]"
    By railer in forum FormMail Subscription Support
    Replies: 3
    Last Post: 20-May-2005, 10:16 PM
  2. An error occurred while processing the form ([M23]).
    By DirtyHowi in forum FormMail Subscription Support
    Replies: 0
    Last Post: 11-Apr-2005, 01:00 AM
  3. Return All Variables To Form Page On Error
    By cornernote in forum FormMail Subscription Support
    Replies: 12
    Last Post: 31-Oct-2004, 10:20 PM
  4. An error occurred while processing the form
    By jloyzaga in forum FormMail Subscription Support
    Replies: 1
    Last Post: 24-Oct-2004, 09:11 AM
  5. Processing error in FormMail - URGENT
    By Jim in forum FormMail Subscription Support
    Replies: 3
    Last Post: 14-Sep-2004, 09:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts