+ Reply to Thread
Results 1 to 6 of 6

Thread: Advanced Error Handling - failed to open stream: Connection timed out

  1. #1
    Join Date
    Aug 2005
    Posts
    25

    Default Advanced Error Handling - failed to open stream: Connection timed out

    Hi Russell,

    I have the form working perfectly, the database is attached, but I have run into a problem with "Advanced Error Handling".

    In my form I have the lines:

    <input type="hidden" name="bad_template" value="form-error.php" />

    <input type="hidden" name="bad_url" value="http://www.domain.com/formmail/fmbadhandler.php" />

    <input type="hidden" name="this_form" value="http://www.domain.com/form.php" />


    In "formmail.php" I have the lines:

    $TEMPLATEDIR = "/home/pub/www/w/i/www.domain.com/formmail/fmtemplates/";


    In "fmbadhandler.php" I have the lines:

    $TARGET_URLS = array("http://www.domain.com");

    $TEMPLATEDIR = "/home/pub/www/w/i/www.domain.com/formmail/fmtemplates/";

    The error page comes up with the missing form information and there is a link:

    "You can return to the form to fix the errors."

    Clicking on ..."return to the form"... causes a long wait before the message appears:

    "
    <p>Cannot open form URL: http://www.domain.com/form.php?USER_....0.6+%28ax%29: failed to open stream: Connection timed out</p>

    I am so close, but for this error.

    Looking at the link ..."return to the form"... the target is:

    http://www.domain.com/formmail/fmbad...our+first+name etc. etc.

    Please, can you help me?

    Anthony

  2. #2
    Join Date
    Aug 2005
    Posts
    25

    Default Re: Advanced Error Handling - failed to open stream: Connection timed out

    Additional Information:

    I created the small php file "php-info.php" containing the following:

    <HTML>
    <BODY>
    <?php
    phpinfo();
    ?>
    </BODY>
    </HTML>

    Opening in the browser gives the result:

    PHP Version 5.0.4

    and a lot more information besides. Is any of it useful to you?

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

    Default Re: Advanced Error Handling - failed to open stream: Connection timed out

    Hi,

    Connection timed out
    This indicates that FMBadhandler had a problem opening the URL to your form.

    There may be information in from phpinfo that helps, but it sounds more like a fault or restriction on your server.

    Try the attached test script to see if opening URLs work.

    If not, contact your hosting provider and show them the test script and ask them why it doesn't work.
    Attached Files
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  4. #4
    Join Date
    Aug 2005
    Posts
    25

    Default Re: Advanced Error Handling - failed to open stream: Connection timed out

    Hi Russel,

    "testurlopen.php" produced the result:

    PHP version is: 5.0.4

    Safe mode is: Off (this is good!)

    URL open succeeded!


    What is the next step? Would the complete output from "phpinfo" be helpful?

  5. #5
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: Advanced Error Handling - failed to open stream: Connection timed out

    Hi,

    Well, that indicates it's going to be a tough problem to solve. Mostly, people use PHP 4, so maybe it's something to do with PHP 5.

    The only thing that springs to mind is something to do with sessions. However, if you're using recent versions of FormMail and FMBadHandler, that shouldn't be a problem.

    We haven't moved to PHP 5 yet, so we'll probably need to do that to replicate and solve the problem.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  6. #6
    Join Date
    Aug 2005
    Posts
    25

    Default Re: Advanced Error Handling - failed to open stream: Connection timed out

    I shall remove the "fmbadhandler.php" for the time being and use a message asking the visitor to click the "Back" button with a javascript "Back" button for good measure.

    It works for me, the data already entered is remembered, however, it might not work for everyone.

    I shall revisit this problem another time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Advanced Error Handling
    By russellr in forum HOWTO Guides and Tips
    Replies: 12
    Last Post: 26-Oct-2005, 11:38 PM
  2. Failed to open CSV file
    By jibber in forum FormMail Subscription Support
    Replies: 6
    Last Post: 15-Sep-2005, 02:26 AM
  3. Upgrade failed
    By ptr in forum FormMail Subscription Support
    Replies: 1
    Last Post: 21-Jan-2005, 11: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, 02:22 AM
  5. William,Failed to send email.
    By shama07 in forum FormMail Subscription Support
    Replies: 1
    Last Post: 31-Jan-2004, 04: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