Results 1 to 9 of 9

Thread: .ini file seems to be empty but is not!

  1. #1
    Join Date
    Feb 2011
    Location
    The Netherlands
    Posts
    14

    Default .ini file seems to be empty but is not!

    When using formmail, it works all the time (even when it should redirect via fmbadhandler for using bad email addresses), and it gives 2 alerts by email:

    Warning: your INI file '/var/www/vhosts/drukkerij-vuyk.nl/private/formmailfm.ini' appears to be empty. This may indicate a syntax error.

    and

    The conditions field "conditions" is not valid. There must be at least 5 components separated by "o". Your value was "nditions".

    My .ini file is NOT empty, this is in it:

    [special_fields]
    conditions = ":##TEST#naam#vul uw naam in a.u.b.#:#TEST#mailadres ~ /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/i #vul het e-mail adres juist in a.u.b.#"

    [email_addresses]
    fm = "info@drukkerij-vuyk.nl"

    The .ini file is in the right place also, and stated in formmail.php:
    $FORM_INI_FILE = "/var/www/vhosts/drukkerij-vuyk.nl/private/formmailfm.ini";

    I checked everything but couldn't find a clou
    It would be very helpful if somebody would find the error?
    thanks

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

    Default Re: .ini file seems to be empty but is not!

    Hi,

    For starters, you have a hidden field called "conditions" with a value of "conditions" in your html form (which is not accurate), and you also have the actual condition statement in your INI. You should remove the conditions field from the form.

    ginger

  3. #3
    Join Date
    Feb 2011
    Location
    The Netherlands
    Posts
    14

    Default Re: .ini file seems to be empty but is not!

    Hi
    Thanks for the reply
    I removed the conditions field from the form, but no change.
    The address is www dot drukkerij-vuyk dot nl/contact.php
    The alert mail is:
    Warning: your INI file '/var/www/vhosts/drukkerij-vuyk.nl/private/formmailfm.ini' appears to be empty. This may indicate a syntax error.
    Still in the .ini file there is this statement:
    [special_fields]
    conditions = ":##TEST#naam#vul uw naam in a.u.b.#:#TEST#mailadres ~ /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/i #vul het e-mail adres juist in a.u.b.#"

    [email_addresses]
    fm = "info@drukkerij-vuyk.nl"

    Very strange

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

    Default Re: .ini file seems to be empty but is not!

    I removed the conditions field from the form, but no change.
    You're still receiving this error message? "The conditions field "conditions" is not valid. There must be at least 5 components separated by "o". Your value was "nditions".



    When using formmail, it works all the time (even when it should redirect via fmbadhandler for using bad email addresses), and it gives 2 alerts by email:
    It's not "working". It's trying to tell you there are errors. Those are "alert" messages representing errors.

    It seems like sometimes the error messages regarding the ini file are misleading, and the problem is often sometimes a file path problem rather than the error message that the script outputs. I'm not saying that this is the problem in this situation, just that sometimes the error is different than the message, especially regarding INI files it seems.

    You've specified a full url for bad_template. The form field should just contain the file name of your error template, and the rest of the file path comes from the TEMPLATEDIR setting in formmail.php.

    ginger

  5. #5
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: .ini file seems to be empty but is not!

    an easy way to check ur INI file is to set DB_SEE_INI in FormMail to true then browse to it or submit ur form

    all formmail will do is display ur ini file. if it doesn't look right, then u can start to investigate why the ini file is not working - like ginger said it might be the wrong path or file permissions, etc.

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

    Default Re: .ini file seems to be empty but is not!

    Quote Originally Posted by crabtree
    it might be the wrong path or file permissions, etc.
    I also was wondering if permissions might be the problem since the INI file is in the "private" directory. You might try moving it out of that directory and see if it helps. You can also put it above the public_html to keep it from being accessible by the public.

    ginger

  7. #7
    Join Date
    Feb 2011
    Location
    The Netherlands
    Posts
    14

    Default Re: .ini file seems to be empty but is not!

    Quote Originally Posted by ginger23 View Post
    It's not "working". It's trying to tell you there are errors. Those are "alert" messages representing errors.
    What I meant: when submitting the form, you get the good_url and also the html template as mail, so that is working regardless the errors...


    Quote Originally Posted by ginger23 View Post
    You're still receiving this error message? "The conditions field "conditions" is not valid. There must be at least 5 components separated by "o". Your value was "nditions".
    No, that stopped. I think this is because the conditions are no longer checked now for the hidden field is removed.
    I'll check the filepaths again and the permissions and bad_template url.
    Thanks for noting this
    Arno

  8. #8
    Join Date
    Feb 2011
    Location
    The Netherlands
    Posts
    14

    Default Re: .ini file seems to be empty but is not!

    Quote Originally Posted by crabtree View Post
    an easy way to check ur INI file is to set DB_SEE_INI in FormMail to true then browse to it or submit ur form

    all formmail will do is display ur ini file. if it doesn't look right, then u can start to investigate why the ini file is not working - like ginger said it might be the wrong path or file permissions, etc.
    I'll try this one also, thanks

  9. #9
    Join Date
    Feb 2011
    Location
    The Netherlands
    Posts
    14

    Default Re: .ini file seems to be empty but is not!

    The form is working normal now!
    Thanks to the tips I could manage to find out that the .ini file was not in reach of formmail.php because of a setting of my providers' server: open basedir - this prevented contact with higher level files.
    First I tried crabtree's tip DB_SEE_INI which returned empty
    Then Gingers remark about permissions made me turn permissions to 777 but at no avail.
    As I have an other site with the same host that does work I mailed them what the trouble could be.
    They replied that the open basedir was different and changed that.
    Thanks Crabtree and Ginger

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using the ini file
    By additude in forum Community Support
    Replies: 4
    Last Post: 18-Jan-2009, 10:41 AM
  2. Attached file arrives empty - 0kb
    By liam in forum Community Support
    Replies: 2
    Last Post: 16-Sep-2007, 09:50 PM
  3. Help with INI file
    By tgunnerson in forum Community Support
    Replies: 2
    Last Post: 17-Jan-2007, 10:02 PM
  4. Why can't i use the ini file?
    By Tommy in forum Community Support
    Replies: 3
    Last Post: 21-Nov-2006, 02:48 PM
  5. cvs file empty? help!
    By zoe77 in forum FormMail Subscription Support
    Replies: 6
    Last Post: 20-Jun-2004, 02:06 AM

Tags for this Thread

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
  •