Results 1 to 4 of 4

Thread: ini file not working

  1. #1
    Join Date
    Aug 2010

    Default ini file not working

    -------------Update - problem solved - it was the path to the ini -- thanks anyway!

    I have formmail working fine without using an .ini file, but I would like the added security of using an ini file. I've been trying to get it working for hours without any luck.

    I have read the following well documented tutorials:

    Here's what I have configured as of now:

    hosting is running apache, php5, formmail version $FM_VERS = "8.23";

    path of .ini:

    contents of .ini:
    me = ""

    config of formmail.php:

    define("DB_SEE_INI",true); for testing -- when submitting the form I receive a message listing the path to coop.ini but the contents of the .ini file do not display. I have also tried the form with above set to "false" without luck.

    $TARGET_EMAIL = array(EMAIL_NAME,"^tc@mysite\.com$");

    $FORM_INI_FILE = "/"; -- I have tried multiple paths like /ini/cp.ini and and have also placed cp.ini in different directories without luck.

    My contact form has an .shtml extension, the hidden field that reference the contents of the .ini file:
    <input type="hidden" name="recipients" value="me" />

    I'm stumped, any help is appreciated.

    Last edited by coop; 06-Aug-2010 at 11:59 PM. Reason: problem solved

  2. #2
    Join Date
    Aug 2010

    Default Re: ini file not working

    After playing around some more with the script I am now receiving an email alert that says:

    The following error occurred in FormMail :
    Error=The FormMail INI file '/' has a syntax error

    I'm not sure what the syntax error is:

    me = ""

    Also I corrected the typo in my original post, but no luck:
    $TARGET_EMAIL = array(EMAIL_NAME."^tc@mysite\.com$");

    Last edited by coop; 07-Aug-2010 at 12:00 AM.

  3. #3
    Join Date
    May 2008

    Default Re: ini file not working

    That error message often indicates a problem with the path to the INI file. Check with your host to find the absolute/server path to the INI file. You can also check by running test alert which will send you an email that shows the server path to the document root. You can then add on to that to get the path to the INI file.

    As for your $TARGET_EMAIL setting, it's incorrect. It should be either:

    $TARGET_EMAIL = array("^tc@dvlsite\.com$");
    . . . OR if you want any address at that domain to be allowed to receive email from form submissions, then . . .

    $TARGET_EMAIL = array(EMAIL_NAME."@dvlsite\.com$");

  4. #4
    Join Date
    Aug 2010

    Thumbs up Re: ini file not working

    ginger23 - thanks for the reply. The path to the .ini file was the problem, it's working now. Thanks for the tip on the TARGET_EMAIL.

    What a great application!


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. mutiple recipients not working with ini file
    By saejoon in forum Bug Reports
    Replies: 3
    Last Post: 25-Sep-2006, 05:53 PM
  2. Trouble with the formmail ini function
    By Carina in forum Community Support
    Replies: 3
    Last Post: 17-Sep-2006, 02:48 PM
  3. Replies: 1
    Last Post: 23-Aug-2006, 09:32 PM
  4. Formmail ini file
    By Wayne Hammond in forum Features Questions
    Replies: 5
    Last Post: 28-Jun-2006, 02:05 PM
  5. Save to CSV file not working, Directory path
    By mkw in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Oct-2004, 11:28 PM


Posting Permissions

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