Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Formmail gives error

  1. #1
    Join Date
    Jan 2006
    Posts
    6

    Default Formmail gives error

    I just uploaded the formmail.php and the sampleform.html and I tried to use it...


    this is the error message that i received...

    An error occurred while processing the form .

    Please contact us directly since this form is not working .
    We apologize for any inconvenience this error may have caused. Your form submission was processed by (7.04), available from www.tectite.com.



    what do you think is the error?

  2. #2
    Join Date
    Jul 2005
    Posts
    175

    Default Re: Formmail gives error

    hi

    do you have already configured formmail.php?
    also you have to configure the sampleform.html

    take a look here and/or here

    erik

  3. #3
    Join Date
    Jan 2006
    Posts
    6

    Default Re: Formmail gives error

    I believe these are the changes i have made

    formmail.php
    define("abs","^[-a-z0-9.]+"); // the '^' is an important security feature!
    $TARGET_EMAIL = array(abs."@absabs.us$");

    my email address is abs@absabs.us

    sampleform.html

    <!-- STEP 1: Put the full URL to formmail.php on your website in the 'action' value. -->
    <form method="post" action="http://houckremodeling.com/formmail.php" name="SampleForm">
    <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
    <!-- STEP 2: Put your email address in the 'recipients' value.
    Note that you also have to allow this email address in the
    $TARGET_EMAIL setting within formmail.php!
    -->
    <input type="hidden" name="recipients" value="abs@absabs.us" />
    <!-- STEP 3: Specify required fields in the 'required' value -->
    <input type="hidden" name="required" value="email:Your email address,realname:Your name" />
    <!-- STEP 4: Put your subject line in the 'subject' value. -->
    <input type="hidden" name="subject" value="Sample FormMail Testing" />

    <table border="1" cellspacing="5%">
    <tr>
    <td>
    <p>Please enter your name:</p>
    </td>
    <td><input type="text" name="required" />
    </td>
    </tr>
    <tr>
    <td>
    <p>Please enter your email address:</p>
    </td>
    <td><input type="text" name="required" />
    </td>
    </tr>


    Do you think I have missed out something?
    Last edited by abs; 09-Jan-2006 at 05:05 PM.

  4. #4
    Join Date
    Jul 2005
    Posts
    175

    Default Re: Formmail gives error

    em, yep.

    first to the formmail.php file:

    this line isn't recommended to be modified, set it back to original condition as below:
    Code:
    define("EMAIL_NAME","^[-a-z0-9.]+");	// the '^' is an important security feature!
    furthermore the TARGET_EMAIL has to look like this in your case:
    Code:
    $TARGET_EMAIL = array("^abs@absabs\.us$");
    and it's recommended to set the DEF_ALERT, in your case i suggest:
    Code:
    define("DEF_ALERT","abs@absabs.us");
    (set it to the email address that will be sent any alert messages - such as errors - from the script)


    second to the sampleform.html file:

    it looks quite good, except that you haven't to change realname and email to required in your input fields for name and email address. to get it working adjust it this way:

    Code:
    <table border="1" cellspacing="5%">
    <tr>
    <td>
    <p>Please enter your name:</p>
    </td>
    <td><input type="text" name="realname" />
    </td>
    </tr>
    <tr>
    <td>
    <p>Please enter your email address:</p>
    </td>
    <td><input type="text" name="email" />
    </td>
    </tr>
    that it should be.

    best, erik

  5. #5
    Join Date
    Jan 2006
    Posts
    6

    Default Re: Formmail gives error

    I am getting a new error
    Parse error: parse error in /home/httpd/vhosts/houckremodeling.com/httpdocs/formmail.php on line 6964
    From formmail.php,

    // handle type attribute first
    $s_pat = '/(<\s*input[^>]*type="(?:radio|checkbox)"[^>]*name="';
    $s_pat .= preg_quote($s_name,"/");
    $s_pat .= '"[^>]*value="';
    $s_pat .= preg_quote($s_value,"/");
    $s_pat .= '")([^>]*?)(\s*\/\s*)?>';
    $s_pat .= '/ims';
    $s_buf = preg_replace($s_pat,'$1$2 checked="checked" $3>',$s_buf);
    The last line is line 6984

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

    Default Re: Formmail gives error

    Hi,

    The last thing you did to formmail.php (editing it or uploading it) has corrupted it.

    You need to download formmail.php again, and reconfigure it using a simple program like Windows Notepad.

    You need to upload using a program you know will not damage the contents of the file.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Jan 2006
    Posts
    6

    Default Re: Formmail gives error

    It worked.

    But I got a second email which gave this
    To: abs@absabs.us

    From: FormMail@houckremodeling.com



    The following error occurred in FormMail :

    Unable to create check file "/tmp/fmf8855b.txt": failed to open stream: No such file or directory



    contact: 'Y'

    colors: 'yellow'

    vehicles: 'Truck'

    mesg: 'dsfa'
    what does it mean? How do I stop error messages?

  8. #8
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Formmail gives error

    Hi,

    This error means that PHP is not configured properly on your server. FormMail is trying to create a temporary file and PHP is configured to create temporary files in a place that doesn't exist (called "/tmp")!

    The correct solution is to get your hosting provider to fix the PHP configuration. Temporary files are important for many PHP scripts.

    You can workaround this by telling FormMail not to check for a new version...

    Look for:
    PHP Code:
    define("CHECK_FOR_NEW_VERSION",true); 
    and change it to:
    PHP Code:
    define("CHECK_FOR_NEW_VERSION",false); 
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Jan 2006
    Posts
    6

    Default Re: Formmail gives error

    Everything is working great now. But how do I redirect it to a different page after form submission...

    I used this
    <input type="hidden" name="redirect" value="http://houckremodeling.com/thanks.html">
    it didnt work....

    any suggestions?

  10. #10
    Join Date
    Jan 2006
    Posts
    6

    Default Re: Formmail gives error

    I am the host. I lease the server. So, where do I create these tmp folder?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FORMMAIL error
    By treborito in forum FormMail Subscription Support
    Replies: 54
    Last Post: 26-Oct-2004, 02:45 AM
  2. Processing error in FormMail - URGENT
    By Jim in forum FormMail Subscription Support
    Replies: 3
    Last Post: 14-Sep-2004, 08:33 PM
  3. FormMail Error
    By jrscards in forum FormMail Subscription Support
    Replies: 2
    Last Post: 27-Jun-2004, 08:35 PM
  4. FormMail Script Error Message
    By rose in forum FormMail Subscription Support
    Replies: 2
    Last Post: 27-Jun-2004, 04:59 AM
  5. Error Messsage for Formmail.php
    By dparker2 in forum FormMail Subscription Support
    Replies: 8
    Last Post: 01-Jun-2004, 07:09 AM

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
  •