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

Thread: PLEASE help - I've looked but cannot find!

  1. #1
    Join Date
    Nov 2005
    Posts
    10

    Default PLEASE help - I've looked but cannot find!

    I must say that I'm a little peeved after typing all this out for nearly 15 minutes, submitted the form only to find out that it asked me to log IN again... grr..... BUT, let me try again.
    ==================================================
    (Please understand this is a bit bumpy for me as I'm still learning the PHP language - so please bear with me) I tried looking on the forums to see if anyone else was having issues like this or anything related and only found bits and pieces of what I needed and tried them. (see below)

    I have a new website for a customer located at http://www.newyorktaxidermy.org. On that website, they decided to use a form to allow visitors to join their organization.

    The form is located at: http://www.newyorktaxidermy.org/modu...hip&file=apply.

    The form is working fine from what I can tell, however, the error handling is not like I want it to display. The site is created using PHPNuke, so it is all dynamically generated using PHP and a MySQL DB. The form was created using a MODULE creator which takes generic html and converts it to PHP for use in a PHPNuke website. (http://www.newbiehangout.com/modules...ex&func=Module)

    Here's the PHP Information: http://www.newyorktaxidermy.org/info.php. Everything is as you suggest it should be for formmail to work properly.

    ==================================================
    Here's what's in the form (apply.php):
    ------------------------------------
    <input type=hidden name="required" value="Name,Address,City,State,Zip,email,Phone">

    <input type=hidden name="good_url" value="http://www.newyorktaxidermy.org/modu...ip&file=thanks">

    <input type=hidden name="bad_url" value="http://www.newyorktaxidermy.org/fmbadhandler.php">

    <input type=hidden name="bad_template" value="error.htm">

    ==================================================
    Here's what's in FORMMAIL and FMBADHANDLER:
    ----------------------------------------------
    $TEMPLATEDIR = "/hsphere/local/home2/taxiderm/newyorktaxidermy.org/templates";

    $TEMPLATEURL = "";

    $TARGET_URLS = array();
    ==================================================

    Well, I have everything working fine with the exception of one thing, it simply doesn't LOOK like the rest of their site!! The templates directory is at root in folder labeled as "templates".

    Here's what I tried to do to get it to work and look like the rest of the site.

    TRY #1:
    I took the module creator I mentioned above and took the SAMPLE error form you provide... converted it to a PHP file. Placed that file in the templates directory and named it error.php. Changed the form to read error.php instead of error.html. I then changed FORMMAIL and FMBADHANDLER settings of $TEMPLATEDIR and changed it to read nothing and changed $TEMPLATEURL to http://www.newyorktaxidermy.org/ with no success.

    TRY #2:
    I tried creating an error.php file, using the module creator mentioned above and placed it within the same folder as the FORM and changed the form settings of bad_url and good_url to reflect the appropriate pages of thanks.php and error.php. The error.php page referenced the "include(error.htm);" but only listed the text and none of the fields that were required.

    TRY #3:
    After neither of the above 2 worked, I continued on trying to get the $TEMPLATEURL and $TEMPLATEDIR with either an htm file or PHP file in the templates directory to work without success.

    Currently right now, the page loads without any hitch using the HTML template provided, but it doesn't look like the rest of the site and that's what I'm really after. HELP!!! (haha)

    I guess what I need, is to figure out EXACTLY:

    1. $TEMPLATEURL

    2. $TEMPLATEDIR

    3. WHAT needs to be in a PHP error page that I have created as far as variables and where do I read up or pick up a sample script on how to create it?!

    4. Can it be used with PHPNuke portal?

    Sorry to be a pain in the aS$ but I know that this script is good, and that's why I've been trying for 3 days to get it to work!!

    Thanks in advance, (hopefully this post will assist others in the future)
    Matt
    Last edited by websystemz; 30-Nov-2005 at 11:27 PM.

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

    Default Re: PLEASE help - I've looked but cannot find!

    Hi,

    You seem to have tried this, but maybe you missing something.

    For a dynamic site like yours, you need to do the following:
    1. Set $TEMPLATEURL in *both* formmail.php and fmbadhandler.php.
    2. Set $TEMPLATEDIR to empty in *both* formmail.php and fmbadhandler.php.
    3. Ensure your template is named ".php" (or whatever is appropriate).
    4. Ensure that bad_template is set to this name (e.g. "error.php").
    When you've created your error template, open it in a browser. Only when it looks about right in the browser will it have any chance of looking right when used as the error template via FormMail/FMBadHandler.

    Please do the above, and it still doesn't work, post back so I check it out.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Nov 2005
    Posts
    10

    Default Re: PLEASE help - I've looked but cannot find!

    Russel - Thanks for the quick reply.

    I've done as you instructed, however, just to let you know, with the module creator, you cannot simply visit the error page via PHPNuke, as it states that you cannot access the file directly.

    The error page is here - however, you cannot access it by simply visiting the URL http://www.newyorktaxidermy.org/templates/error.php

    The error page is just your error page, converted to PHP script by using the module creator mentioned earlier.
    ===============================
    Note, that after making the changes you instructed, (I entered http://www.newyorktaxidermy.org/templates for $TEMPLATEURL; nothing in $TEMPLATEDIR and set error.php for the bad_template setting and confirmed that the page is in fact .php.

    After submitting the form, I'm getting the following error:

    Cannot open template 'http://www.newyorktaxidermy.org/templates/error.php?USER_AGENT=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Windows+NT+5.1%3B+SV1%3B+.NET+CLR+1.1.4322%29': failed to open stream: Operation timed out

    BUT - - - When I copy/paste that link - I get the same result as routing to it by the link http://www.newyorktaxidermy.org/templates/error.php

    Confused now!! lol

    Wrong URL set in $TEMPLATEURL perhaps?

    I think that also, maybe I'm caught up in the idea of converting HTML to PHP and it's not working, whereas, I SHOULD be concentrating on a template made entirely of php instead of converting your HTML over to php!! How would I go about that?

    Thanks again, -

    Matt
    Last edited by websystemz; 01-Dec-2005 at 01:06 AM.

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

    Default Re: PLEASE help - I've looked but cannot find!

    Hi,

    The error page is here - however, you cannot access it by simply visiting the URL http://www.newyorktaxidermy.org/templates/error.php
    That's weird. Do you know why?

    If you can't access it via a browser, then FMBadHandler can't either. So, it isn't going to work.

    You need to solve this problem that PHPNuke is imposing on you before you can make progress.

    After submitting the form, I'm getting the following error:

    Cannot open template 'http://www.newyorktaxidermy.org/templates/error.php?USER_AGENT=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Windows+NT+5.1%3B+SV1%3B+.NET+CLR+1.1.4322%29': failed to open stream: Operation timed out
    Templates work by FMBadHandler opening the URL to the template (just like a browser) and substituting the values before sending the output to the user's browser.

    This PHPNuke problem is the first one.

    Sometimes, servers don't allow PHP to open URLs. The FMBadHandler download has a test script for this. You should try that to see if you have another problem. But fix the PHPNuke thing first.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Nov 2005
    Posts
    10

    Default Re: PLEASE help - I've looked but cannot find!

    OK Russell, will try to, but I wanted to post the code generated by the module creator so you can see what EXACTLY is in the error.php page I am trying use as the template.

    Code:
     <?php
    #### Generated by Module Creator - By Disipal site (www.disipal.net) ####
    if (!eregi("modules.php", $PHP_SELF)) {
       die ("You can't access this file directly...");
    }
    require_once("mainfile.php");
    $module_name = basename(dirname(__FILE__));
    get_lang($module_name);
    include("header.php");
    $index = 0;
    OpenTable();
    echo"<body>"
      . "<center><h4>UTNY Application Form Error</h4></center>"
      . "<p>We are unable to complete your registration as a member of the United Taxidermists of New York because the  following fields <font color=\"red\"><b>MUST</font></b> be filled in. Please fill in these fields as they are required for membership application.</p>"
      . "<p><b>Here is the full error message:</b></p>"
      . "<fmfullerror/>"
      . "  <hr/>"
      . "  <p>The basic error message is: <b><fmerror/></b></p>"
      . "  <hr/>"
      . "  <p>Extra error information: <b><fmerrorextra/></b></p>"
      . "  <hr/>"
      . "  <p>This is a list of items in error:</p>"
      . "  <ul>"
      . "	  <fmerroritemlist/>"
      . "  </ul>"
      . "  <hr/>"
      . "  <p>The first and second items in error:</p>"
      . "  <ul>"
      . "	  <li><fmerroritem1/></li>"
      . "	  <li><fmerroritem2/></li>"
      . "  </ul>"
      . "  <hr/>"
      . "  </body>";
    CloseTable();
    include("footer.php");
    ?>
    Any thoughts would be welcome and I've tried commenting out the first three AND four lines like this, but not a winner:

    Code:
      <?php
    #### Generated by Module Creator - By Disipal site (www.disipal.net) ####
    //if (!eregi("modules.php", $PHP_SELF)) {
    //   die ("You can't access this file directly...");
    //}
    //require_once("mainfile.php");
    $module_name = basename(dirname(__FILE__));
    get_lang($module_name);
    include("header.php");
    $index = 0;
    OpenTable();
    echo"<body>"
      . "<center><h4>UTNY Application Form Error</h4></center>"
      . "<p>We are unable to complete your registration as a member of the United Taxidermists of New York because the  following fields <font color=\"red\"><b>MUST</font></b> be filled in. Please fill in these fields as they are required for membership application.</p>"
      . "<p><b>Here is the full error message:</b></p>"
      . "<fmfullerror/>"
      . "  <hr/>"
      . "  <p>The basic error message is: <b><fmerror/></b></p>"
      . "  <hr/>"
      . "  <p>Extra error information: <b><fmerrorextra/></b></p>"
      . "  <hr/>"
      . "  <p>This is a list of items in error:</p>"
      . "  <ul>"
      . "	  <fmerroritemlist/>"
      . "  </ul>"
      . "  <hr/>"
      . "  <p>The first and second items in error:</p>"
      . "  <ul>"
      . "	  <li><fmerroritem1/></li>"
      . "	  <li><fmerroritem2/></li>"
      . "  </ul>"
      . "  <hr/>"
      . "  </body>";
    CloseTable();
    include("footer.php");
    ?>

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

    Default Re: PLEASE help - I've looked but cannot find!

    Hi,

    It looks like PHPNuke does some weird stuff. Everything seems to be run via a thing called "modules.php".

    So, if you can figure out the correct URL to access error.php, then you can work from there.

    It must documented somewhere.

    I've not dealt with PHPNuke before, so this is a bad first impression.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Nov 2005
    Posts
    10

    Default Re: PLEASE help - I've looked but cannot find!

    Not a bad first impression at all - it's a "learning curve" that you haven't experienced, as have I !! Just a little homework... haha...

    Either way, this is what I've learned so far - and it's odd.

    I've tried juggling some things around... and here's what I've got for you below.

    PHPNuke, runs like you said, within modules (surprised no one else has asked about this!). That being the case, here's what I've got as a directory structure.

    DOMAIN ROOT
    - admin (folder)
    - blocks (folder)
    - modules (folder)
    - Membership (folder)
    apply.php (file)
    error.php (file)
    index.php (file)
    thanks.php (file)

    The following links correspond to each of the files:

    http://www.newyorktaxidermy.org/modu...hip&file=apply (apply.php)

    http://www.newyorktaxidermy.org/modu...mbership&error (error.php)

    http://www.newyorktaxidermy.org/modu...ame=Membership (index.php)

    http://www.newyorktaxidermy.org/modu...bership&thanks (thanks.php)

    Each link CAN be viewed now without issues.

    The PROBLEM is that in order to see the error.php page (your HTML page converted to PHPNuke module, using that converter), I HAD to change the following:

    On the FORM (apply.php)
    ------------------------
    had to change bad_url to:
    http://www.newyorktaxidermy.org/modu...mbership&error

    and remove the line reference to fmbadhandler.php (just to see it) and comment out the bad_template line. So the form has only:
    good_url; bad_url
    and does NOT have bad_template - defeating the purpose of course. haha

    In FORMMAIL and FMBADHANDLER.PHP, I did nothing. Left it as it was.

    This of course, allowed me to see the error.php file - with NO variables passed because it was set as bad_url.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    AFTER trying that, I went back in to the form and UNcommented the bad_template line leaving it as error.php and set the $TEMPLATEURL = http://www.newyorktaxidermy.org/modules/Membership (NOT to the templates directory because I know from testing above, that the error.php page loaded as I wanted it to - uniformly to the rest of the site) (*just for fun, I tried to set the $TEMPLATEURL to http://www.newyorktaxidermy.org/modu...mbership&file= with no luck either - hey, it was worth the try!)

    I then submitted the form again, with no data, to find the result once again to be that long line referencing MOZILLA - blah-blah-blah.

    So - if you can think of anything, let me know please.

    Thanks again Russell, maybe someone that got it up and running on PHPNuke site will have the answer as they browse through here or maybe it will get a die-hard coder to look at it and see what's up!

    Thanks,

    Matt

    PS: Just had a thought - changed the form to read: http://www.newyorktaxidermy.org/modu...badhandler.php for the bad_url line - but no go either. Nuts!!
    Last edited by websystemz; 01-Dec-2005 at 02:36 AM. Reason: PS at the bottom

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

    Default Re: PLEASE help - I've looked but cannot find!

    Hi,

    Well, this is progress.

    But first get the URLs working.

    This does not appear to work:
    http://www.newyorktaxidermy.org/mod...embership&error (error.php)

    It shows the membership info page not the error template.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Nov 2005
    Posts
    10

    Default Re: PLEASE help - I've looked but cannot find!

    Sorry Russell - EVERY one of those is screwed up - detail - detail!!

    Here's the corrected links:

    http://www.newyorktaxidermy.org/modu...hip&file=apply

    http://www.newyorktaxidermy.org/modu...hip&file=error

    http://www.newyorktaxidermy.org/modu...ip&file=thanks

    http://www.newyorktaxidermy.org/modu...ame=Membership

    Those are working correctly - just a typo. Sorry

  10. #10
    Join Date
    Nov 2005
    Posts
    10

    Default Re: PLEASE help - I've looked but cannot find!

    This is what is set in the pages:

    Form page: (apply.php)

    Code:
       . "<input type=hidden name=\"good_url\" value=\"http://www.newyorktaxidermy.org/modules.php?name=Membership&amp;file=thanks\">"
      . "<input type=hidden name=\"bad_url\" value=\"http://www.newyorktaxidermy.org/modules.php?name=Membership&amp;file=fmbadhandler.php\">"
      . "<input type=hidden name=\"bad_template\" value=\"error.php\">"

    FORMMAIL & FMBADHANDLER:


    Tried changing the links in both the form and fmbad... and formmail to
    http://www.newyorktaxidermy.org/modu...embership&file= but no luck. Could I reference the actual template page as "&file=error.php" and have it work??

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can't find pricing
    By Mareid in forum FormMail Computation Module
    Replies: 3
    Last Post: 11-Dec-2008, 07:07 PM
  2. Can't find template for good and bad
    By Jimmac in forum FormMail Subscription Support
    Replies: 1
    Last Post: 27-Jul-2007, 09:26 PM
  3. Templates can't find them so gives error
    By Jimmac in forum Community Support
    Replies: 7
    Last Post: 27-Jul-2007, 05:53 PM
  4. Cannot find server message
    By fullfocus in forum Community Support
    Replies: 3
    Last Post: 23-Oct-2006, 10:19 PM
  5. Form returns can't find page -why?
    By lucas_p in forum Community Support
    Replies: 4
    Last Post: 28-Apr-2006, 08:22 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
  •