Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Failed to open template

  1. #1
    Join Date
    Apr 2008
    Posts
    11

    Default Failed to open template

    I have configured formmail.php (formhandler.php on my site) to read:
    $TEMPLATEDIR = "/formhandlertemplates"; // directory for template files; empty string

    formhandler.php is in directory formhandler at the root of cohase.org

    I have configured my form to read:
    <input type="hidden" name="mail_options" value="FromAddr=formchambercohase.org,PlainTemplate=infoPlain.txt,NoEmpty" />

    formhandlertemplates is a directory at the root of cohase.org

    infoPlain.txt is in formhandlertemplates

    But I get the following error -
    Failed to open template "/formhandlertemplates/infoPlain.txt" : fopen(/formhandlertemplates/infoPlain.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory

    Referring page was http://cohase.org/form_info.shtml

  2. #2
    Join Date
    Apr 2008
    Posts
    11

    Default Re: Failed to open template

    Interesting that there was never a response on this. I realize that this is free software and that I have not paid for a support subscription, but I would have expected that the authors/owners would have been concerned that a portion of their script does not seem to work as advertised. That seems to have been an invalid assumption.

    I hope I'm wrong as this seems to be an otherwise good product.

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

    Default Re: Failed to open template

    Hi,

    The issue is that everyone thinks that the problem they are having is caused by a fault in FormMail.

    99.9999% of the time it isn't.

    Of the 73,000 people who downloaded FormMail in the last 12 months, 1 person reported an actual fault we had to correct (maybe it was 2, but that's the order of magnitude we're talking about). And, it was very esoteric - nothing simple like the problem you're having.

    So, if we respond to every forum post then we're providing free support, which we just cannot afford to do for a free product.

    I'm sure we can fix your problem if you subscribe.

    However, we recommend you first use the free resources and documentation we've provided.

    Basically, you're not providing the correct directory path....simple as that.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  4. #4
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Failed to open template

    You tell 'em Russell

    Amazes me the way people will gripe about a free product. Especially one that obviously has hours upon untold hours of development time built into it.

    And a free user's Forum, to boot.

    Here's to the best form-to-email script in Cyberspace!!

    Woohoo!
    Last edited by Jamesiv1; 25-Apr-2008 at 12:53 AM.
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

  5. #5
    Join Date
    Apr 2008
    Posts
    11

    Default Re: Failed to open template

    Yup. He told me. Not what was wrong. Just that I should have either figured it out for myself or paid $40 to get help. And for what it's worth? I studied the instructions AND I read all the relevant posts I could find in all the forums. Several times. Before I posted anything. This isn't my first php script but it IS the only one so far that I got totally stuck on because I couldn't make the instructions work the way I read them. And it wasn't for lack of trying. So am I convinced that formmail is broken? No. Quite probably it's not. Overall it looks like an excellent product. Maybe the instructions just aren't as clear to me as they could be. Maybe I'm just being stupid about them. Frankly, I don't know. That's why I asked for help. Someone out there must be more knowledgeable about this than I am.

    So yeah James, it's a free users forum. One that says, "You can download and get support for our free PHP FormMail." But free is worth nothing to me if it doesn't produce any answers. Russell said, "Basically, you're not providing the correct directory path....simple as that." Apparently it's not so simple. Or I would have figured it out. Or somebody on this forum would have pointed out what I did wrong. I still have no clue.

    James. Thanks for your help. Oh wait. You didn't help. It was more important to tell me I had no right to complain. Real supportive of you. I guess I should just pay my $40 and hope I don't run into any issues after my support period is up. Sorry if expressing my disappointment is so distressing to you.

  6. #6
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Failed to open template

    Now, now... no need to get snippity.

    Try using the whole URL in your TEMPLATEDIR line. Like this:

    $TEMPLATEDIR = "http://www.cohase.org/formhandlertemplates";
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

  7. #7
    Join Date
    Apr 2008
    Posts
    11

    Default Re: Failed to open template

    Interesting. That works. I wonder why. I would have understood that from the instructions as being what belonged in TEMPLATEURL not TEMPLATEDIR.

    Thanks,

  8. #8
    Join Date
    Feb 2008
    Posts
    149

    Default Re: Failed to open template

    Good deal. Glad you got it working. I take it back.. I'm not glad.

    heheh Just kidding.

    I don't know why it works. It doesn't really jive with the Help docs.

    I'm pretty sure its not the "proper" way to do it, but it works.

    I've also used the same technique for MULTIFORMDIR and it works there as well.

    Anyhoo... enjoy the script. And cut Russell a little slack, will ya? He wrote a righteous piece of software, and for goodness sake he can't be answering every single "help me" post. A guy's gotta make a living.

    Peace.
    Last edited by Jamesiv1; 25-Apr-2008 at 04:34 AM.
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

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

    Default Re: Failed to open template

    Hi,

    Quote Originally Posted by paul.hunt View Post
    Interesting. That works. I wonder why. I would have understood that from the instructions as being what belonged in TEMPLATEURL not TEMPLATEDIR.
    If you use a URL you should use TEMPLATEURL not TEMPLATEDIR.

    If you use a directory/folder path, you should use TEMPLATEDIR.

    It currently works because FormMail uses PHP "fopen" in both circumstances, and PHP "fopen" will open URLs on most servers.

    However, an upcoming version of FormMail will use a completely different method of processing for TEMPLATEURL (and MULTIFORMURL).

    So, when using a URL you should (and soon *will need to*) use TEMPLATEURL and/or MULTIFORMURL.

    Quote Originally Posted by Jamesiv1 View Post
    I don't know why it works. It doesn't really jive with the Help docs.

    I'm pretty sure its not the "proper" way to do it, but it works.
    I've just re-read the documentation for TEMPLATEDIR and TEMPLATEURL. I'm not sure how we can improve this to make it clearer.

    James, if you can give us any feedback on how to make the documentation clearer, it would be much appreciated.

    Quote Originally Posted by Jamesiv1 View Post
    And cut Russell a little slack, will ya? He wrote a righteous piece of software, and for goodness sake he can't be answering every single "help me" post.
    Thanks for the support James. Also, thanks for your help in the Community Support forum to other users....it doesn't go unnoticed.

    Quote Originally Posted by Jamesiv1 View Post
    A guy's gotta make a living.
    Well, I certainly don't make a living from the little bit of subscription support we get. It just helps recoup some of the cost of providing genuine support.

    Perhaps we should write bad documentation, and have buggy software, and then force people to pay to get any help.

    I know some companies that operate that way, but we never will.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  10. #10
    Join Date
    Feb 2008
    Posts
    149

    Smile Re: Failed to open template

    Quote Originally Posted by russellr View Post
    If you use a URL you should use TEMPLATEURL not TEMPLATEDIR.
    If you use a directory/folder path, you should use TEMPLATEDIR.
    Well of course. That makes perfect sense. Thanks for explaining that.

    Quote Originally Posted by russellr View Post
    I've just re-read the documentation for TEMPLATEDIR and TEMPLATEURL. I'm not sure how we can improve this to make it clearer.

    James, if you can give us any feedback on how to make the documentation clearer, it would be much appreciated.
    I'll get back to you on this.

    Quote Originally Posted by russellr View Post
    Thanks for the support James. Also, thanks for your help in the Community Support forum to other users....it doesn't go unnoticed.
    My pleasure. I enjoy helping out.

    Quote Originally Posted by russellr View Post
    Perhaps we should write bad documentation, and have buggy software, and then force people to pay to get any help.

    I know some companies that operate that way, but we never will.
    And we, your humble minions, are awfully glad of that.

    I wasn't kidding about the 'righteous software' part. When 1&1 quit supporting the frontpage extensions, I was SOL. Then along comes FormMail to the rescue.

    I'm kinda nuts about email. I can't explain it, but I just love playing with it. If you ever need beta-testers I'll be glad to help.

    On a side note... Thanks for putting http://www.iampeth.com/phpmv2/images/logos/15.png on your pages. I'm now using that too, and love it.

    All the best, Russell. And thanks again.
    Last edited by Jamesiv1; 27-Apr-2008 at 03:15 PM.
    James Ivey
    Interested in calligraphy?
    www.iampeth.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Failed to open CSV file
    By jibber in forum FormMail Subscription Support
    Replies: 6
    Last Post: 15-Sep-2005, 01:26 AM
  2. Error=Failed to send email [M94]
    By colinjack in forum FormMail Subscription Support
    Replies: 21
    Last Post: 26-Jul-2005, 11:23 AM
  3. Upgrade failed
    By ptr in forum FormMail Subscription Support
    Replies: 1
    Last Post: 21-Jan-2005, 10:17 PM
  4. Can error page open in new window leaving original
    By Rezults in forum FormMail Subscription Support
    Replies: 3
    Last Post: 19-Nov-2004, 01:22 AM
  5. William,Failed to send email.
    By shama07 in forum FormMail Subscription Support
    Replies: 1
    Last Post: 31-Jan-2004, 03:08 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
  •