Results 1 to 6 of 6

Thread: [return_link /] renders but server "Cannot open form url"

  1. #1
    Join Date
    Apr 2012

    Default [return_link /] renders but server "Cannot open form url"

    My form is 99% complete. The autoresponder works, the mail templates work, form validation works, sessions are being used, it's all good. The only problem is with [return_link /] fmbadhandler: it renders properly as a link to the correct URL, and while it works on my local WAMP server it times out on the RHEL 5 production server with the following message:

    Cannot open form URL:
    I have most of my form validated from formval.js, but because I need an autoresponder I have to also have reCaptcha. I'm trying to avoid jumping to fmbadhandler because I the [return_link /] times out on my production server, even though I've set fopen_url is on, and both this_form and $TARGET_URLS are dynamically configured to cover my development and live servers. I have tried with and without a manually-set session name in both formmail.php and fmbadhandler.php and my form and template permissions are set to 755.

    <form method="post" action="formmail.php?<?php echo SID; ?>" id="serviceAgreementForm">
    <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" />
    <input type="hidden" name="recipients" value="" />
    <input type="hidden" name="required" value="imageverify:10) Image Verification" /
    <input  type="hidden" name="autorespond"&nbsp;  value="HTMLTemplate=service-agreement-autorespond-template.php,Subject=Service  Agreement  Confirmation,TemplateMissing=NoTemplate,,TemplateMissing=n/a"  />
    <input type="hidden" name="good_template" value="confirmation-service-agreement.php" />
    <input type="hidden" name="bad_template" value="service-agreement-error.htm" />
    <input type="hidden" name="bad_url" value="/fmbadhandler.php" />
    <input type="hidden" name="this_form" value="<?php echo $protocol . '://' . $host; ?>/service-agreement.php" />
    <input type="hidden" name="subject" value="Service Agreement" />
    <input type="hidden" name="website" value="&lt;?php echo $protocol . '://' . $host; ?&gt;" />
    <input type="hidden" name="derive_fields" value="arverify=imgverify" />
    <input type="hidden" name="mail_options" value="HTMLTemplate=service-agreement-template.htm,NoEmpty" />
    <img src="verifyimg.php<?php echo SID; ?>" alt="Image verification" id="vimg" />
    <p>For your security, please enter the characters you see in the image:</p><br>
    <div class="center-align">
      <script type="text/javascript"  src=""></script>
    I've heard of people miraculously fixing things like this by setting a relative path to an absolute path or vice versa, but I with it wasn't so finicky! I have set $use_ssl to true in the recaptcha_get_html() function in recaptchalib.php:
    function recaptcha_get_html ($pubkey, $error = null, $use_ssl = true)

    I checked the fmbadhandler source code, and the problem originates in the function UnCheckStuff($s_buf). On line 1710, fmbadhandler.php has:

      $sFormBuf = GetURL($sFormURL);
      if ($sFormBuf === false)
      ReportError("Cannot open form URL: $sFormURL: $php_errormsg");
    In my case, perhaps my secure server isn't passing along the session properly (although the session ID is clearly visible in the return url). I also tried allowing full access to my form via .htaccess as outline in the fmbadhandler documentation at the top. I welcome any and all tips!
    Last edited by kalanh; 25-Apr-2012 at 08:10 PM.

  2. #2
    Join Date
    Mar 2004

    Default Re: [return_link /] renders but server "Cannot open form url"

    first, can u open a URL to ur template in a normal browser.

    if so,...

    there's a test script called 'testurlopen' which u can get as part of this download:

    it's a small script, easy to understand.

    after checking it works adjust it to open the URL to ur template

    if it doesn't work, ask ur host why ur server can open any URL (in the universe) except the URLs on ur own website

  3. #3
    Join Date
    Dec 2003

    Default Re: [return_link /] renders but server "Cannot open form url"


    Thanks for your support subscription.

    As crabtree is alluding, it might be that your server won't open URLs to your own website.

    Please send me access details to your server using this secure form:
    I'll run some tests to determine what the problem actually is and we'll proceed from there.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder

  4. #4
    Join Date
    Apr 2012

    Default Re: [return_link /] renders but server "Cannot open form url"

    It certainly seems that my server refuses to open its own URLs. I tested with testurlopen.php and it opens just fine. I tried on my own server and received the following:

    URL open for failed:  failed to open stream: Connection timed out
    URL open for failed:  failed to open stream: Connection timed out
    I tried adjusting the test code to use fsockopen with both tls: and ssl:, but both times received:

    fsockopenopen for  failed: unable to connect to  ssl:// (Unknown  error)
    PHP version is 5.1.6.

  5. #5
    Join Date
    Apr 2012

    Default Re: [return_link /] renders but server "Cannot open form url"

    In playing with the testurlopen.php script, I found that a relative path actually does work where internal absolute paths fail. I hope this will offer a clue.

     * This test works!
    $fp = fopen('form.php', 'r');
    if ($fp !== FALSE)
        echo "<p>URL open succeeded for form.php (relative path)</p>";
        echo "<p>URL open for form.php (relative path) failed: $php_errormsg</p>";
    I have opened a support ticket with my hosting company and I am awaiting a response.

  6. #6
    Join Date
    Dec 2003

    Default Re: [return_link /] renders but server "Cannot open form url"


    That's opening a file not a URL.

    So, that's quite a different situation.

    You need to be able to open the URL to your site so that it looks just like a browser is accessing it.

    (I've also replied to your email contact.)
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. "This URL is a Form submission program." Error
    By Axe in forum Community Support
    Replies: 3
    Last Post: 23-Jan-2010, 08:50 AM
  2. when submit get the "open/save php file" box
    By Digiburd in forum Community Support
    Replies: 0
    Last Post: 15-Jan-2008, 06:29 PM
  3. Does "alert_to" form field use "AT_MANGLE" feature?
    By jennyp in forum Community Support
    Replies: 4
    Last Post: 05-Dec-2006, 11:29 PM
  4. "/tmp/fm6010c9.txt": failed to open stream:
    By NordicProductions in forum Community Support
    Replies: 2
    Last Post: 17-Sep-2006, 02:43 PM
  5. "<return_link/>" not parsed
    By johnny in forum FormMail Subscription Support
    Replies: 4
    Last Post: 19-Jun-2005, 02:30 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts