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

Thread: bad_ini...syntax error?

  1. #1
    Join Date
    Dec 2009
    Posts
    9

    Default bad_ini...syntax error?

    Good morning!

    I've just started trying to use Formmail (great tool!), but I've run into a problem with using the INI that I just can't seem to figure out.

    When I try to use the form, I get the following message:
    An error occurred while processing the form .

    The staff at www.federalresumetips.com have been alerted to the error .
    www.federalresumetips.com apologizes for any inconvenience this error may have caused.
    The email I receive from Formmail says:
    The following error occurred in FormMail :
    bad_ini
    **********
    Error=The FormMail INI file '/xxx/formmail.ini' has a syntax error
    I've tried to figure out what the syntax error is in the INI file, but it eludes me. Here is my INI code:
    [special_fields]
    mandatory = "realname,recipients,email"

    [email_addresses]
    myaddress = "contact_us@federalresumetips.com"
    The HTML code for my form is:
    <form method="POST" action="http://www.federalresumetips.com/xxx/formmail.php" name="ContactUs">
    <input type="hidden" name="recipients" value="myaddress" />
    <input type="hidden" name="required" value="mandatory" />
    <input type="hidden" name="subject" value="Contact Us Form" />
    Finally, in the FormMail.php file, Target_Email and Form_INI_File are:
    $TARGET_EMAIL = array("^contact_us@federalresumetips\.com$");

    ...
    $FORM_INI_FILE = "/xxx/formmail.ini";
    Can anyone either tell me what the problem is or direct me to another thread where this is addressed?

    Thank you for any and all help!

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: bad_ini...syntax error?

    [special_fields]
    mandatory = "realname,recipients,email"
    That should be:

    Code:
    [special_fields]
    required = "realname,email"
    You don't need to specify "recipients" as a required field since you're the one specifying it in the INI file.

    And in your form you don't need this line:
    Code:
    <input type="hidden" name="required" value="mandatory" />
    . . . because you're specifying the required fields in the INI file.

    Hope that helps.

  3. #3
    Join Date
    Dec 2009
    Posts
    9

    Default Re: bad_ini...syntax error?

    Ginger23 - thanks for the suggestions, unfortunately the problem still persists.

  4. #4
    Join Date
    May 2008
    Posts
    1,291

    Default Re: bad_ini...syntax error?

    Please post the entire contents of your entire INI file again.

  5. #5
    Join Date
    Dec 2009
    Posts
    9

    Default Re: bad_ini...syntax error?

    Code:
     
    [special_fields]
    required = "realname,email"
     
    [email_addresses]
    myaddress = "contact_us@federalresumetips.com"

  6. #6
    Join Date
    May 2008
    Posts
    1,291

    Default Re: bad_ini...syntax error?

    Looks ok to me now, except for possibly that underscore in the email address. I'm not sure if that would cause problems with Formmail or not. Maybe try changing the recipient's address to something without any special characters and see what happens.

    You might also try setting db_see_ini to true (in formmail.php) and see what it shows:

    Code:
    define("DB_SEE_INI",true);

  7. #7
    Join Date
    Dec 2009
    Posts
    9

    Default Re: bad_ini...syntax error?

    Excluded the underscore...no good.

    DB_SEE_INI was already set to true.

    I guess I may have to go the @ MANGLE route.

  8. #8
    Join Date
    May 2008
    Posts
    1,291

    Default Re: bad_ini...syntax error?

    Quote Originally Posted by jhighland View Post
    I guess I may have to go the @ MANGLE route.
    That shouldn't be necessary; not yet anyway.

    I haven't seen that error before, nor can I find it anywhere in the forum. I'm thinking it might have something to do with the newer version of php (5.3) which parses INI files differently.

    I'd suggest a couple of things:

    1. You could redo your INI file, making sure you create it in a plain text editor, save it with the .ini extension and upload in ascii mode.

    And/Or

    2. Find out what version of PHP your host is running. You can do this by creating a simple php file with a plain text editor and saving it as phpinfo.php. This file should simply include the following (if you're not already aware):
    Code:
    <?php phpinfo() ?>
    Upload it in ascii mode to your root directory then browse to it in your browser. The page will display lots of information, the very first being the version of PHP running on your host.

    If the version of PHP is 5.3, then you might want to contact Russell about what can be done to get rid of this error.

  9. #9
    Join Date
    Dec 2009
    Posts
    9

    Default Re: bad_ini...syntax error?

    PHP is version 4.3.1.1 (I didn't know that trick - lots of interesting info(although I don't know what most of it means))

    I tried redoing the INI file - same problem. Does it matter if the INI file is named formmail.ini or FormMail.ini?

  10. #10
    Join Date
    Jan 2010
    Posts
    4

    Default Re: bad_ini...syntax error?

    I'm seeing the same error message - and I use four formmail forms on my site for various functions. They all worked before I upgraded to version 8.20, now none works.

    One of my ini files is as follows:

    ^^^^^^^^^^

    [special_fields]
    required = "fullname:Your name,email:Your email address,file,imgverifylease enter the characters you see in this image"

    conditions = ":@@TEST@check~/^$/@oops, something has gone wrong, please try again@"

    [email_addresses]
    aametbuzzaddress = "info@aametbuzz.com"

    ^^^^^^^^^^

    On one form I've already changed the email alias to 'aametbuzzaddress' as before this was different (though it worked), thinking it might be the problem, but I'm seeing the same error message. I've changed DB_SEE_INI from false to 'true' (though I'm not sure what I'm supposed to be seeing, if anything).

    Any help much appreciated!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
    By adrianconchie in forum Community Support
    Replies: 1
    Last Post: 08-Aug-2007, 05:50 AM
  2. Term/syntax meaning questions
    By Elso in forum FormMail Subscription Support
    Replies: 4
    Last Post: 08-Mar-2007, 01:30 AM
  3. Form syntax for "conditions"
    By bersen in forum Community Support
    Replies: 4
    Last Post: 03-Dec-2006, 11:01 PM
  4. syntax-validation for email-address?
    By yogi in forum Community Support
    Replies: 1
    Last Post: 09-Apr-2006, 04:05 PM
  5. syntax-validation for email-address?
    By yogi in forum Features Questions
    Replies: 1
    Last Post: 09-Apr-2006, 04:05 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
  •