Results 1 to 4 of 4

Thread: ini file not working

  1. #1
    Join Date
    Aug 2010
    Posts
    3

    Default ini file not working

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

    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:
    http://www.tectite.com/terry_allen_g...ent/index.html
    http://www.tectite.com/fmhowto/inifile.php
    http://www.tectite.com/fmdoc/form_ini_file.php

    Here's what I have configured as of now:

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

    path of .ini: http://dvl.mysite.com/ini/cp.ini

    contents of .ini:
    [email_addresses]
    me = "tc@dvl.mysite.com"

    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 = "/dvl.mysite.com/ini/cp.ini"; -- 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.

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

  2. #2
    Join Date
    Aug 2010
    Posts
    3

    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 :
    bad_ini
    **********
    Error=The FormMail INI file '/dvl.mysite.com/ini/cp.ini' has a syntax error

    I'm not sure what the syntax error is:

    [email_addresses]
    me = "tc@dvl.mysite.com"

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

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

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

    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:

    Code:
    $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 . . .

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

  4. #4
    Join Date
    Aug 2010
    Posts
    3

    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!

    -coop

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

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
  •