PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Integrating into Coldfusion??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integrating into Coldfusion??

    I am trying to get this to work with a coldfusion page I have, and IIS on a Win2003 server.

    I have the following code in my coldfusion page:

    <cfhttp url="search.cgi?#CGI.QUERY_STRING#" method="GET" timeout="10" throwOnError="yes">
    <!--- display search results --->
    <cfif IsDefined("CFHTTP.FileContent")>
    <cfoutput>#CFHTTP.FileContent#</cfoutput>
    </cfif>

    Its failing though, I have a feeling it has to do with cgi file being allowed in IIS.

    Can anyone tell me how I proceed with this? Anyone done this in CF before??

  • #2
    I believe I have things configured correctly, I mapped the .cgi to the search.cgi in the web extensions, but I keep getting:

    Connection Failure: Status code unavailable

    Comment


    • #3
      Have you tried accessing the .cgi directly? eg. entering http://www.mysite.com/search.cgi in to your browser. If the CGI itself is not running properly in IIS, then I'd say that you have not yet configured IIS to run CGI properly and the problem is not in the CF code.

      If this is the case, please see this FAQ (and the other questions on this page):
      Q. I need help setting up binary CGI support for my Windows IIS server
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        Thanks for the reply.

        I did some playing. I can get the search.cgi to display the search page if I type it in the web browser directly.

        If I use the code:

        <cfhttp url="search.cgi?#CGI.QUERY_STRING#" method="GET" timeout="10" throwOnError="yes">
        <!--- display search results --->
        <cfif IsDefined("CFHTTP.FileContent")>
        <cfoutput>#CFHTTP.FileContent#</cfoutput>
        </cfif>

        I don't see ANYTHING like the search.cgi on my page, basically its blank where the form should be.

        Do I need a page to pass the info to the search.cgi, or how is this suppose to work.

        The page in question is at www.salleboise.com/search.cfm

        Thanks!

        Comment


        • #5
          It might be because your "search.cfm" page and your "search.cgi" are using different encoding/charsets (iso-8859-1 and windows-1252 respectively).

          This is at least one possibility, according to here:
          http://www.petefreitag.com/item/305.cfm

          There's also mention of being able to add a cfhttpparam for charset, or a charset attribute for CFHTTP. You can try these first, failing that, you can change the encoding for the Zoom search_template.html (and on the "Languages" tab of the Indexer) to match the rest of your site.
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            Originally posted by Ray View Post
            change the encoding for the Zoom search_template.html (and on the "Languages" tab of the Indexer) to match the rest of your site.

            If I open up the search_template.html I don't see an encoding, do I need to add a <head> section and set the encoding there? Or somewhere else?

            Comment


            • #7
              Originally posted by Ray View Post
              It might be because your "search.cfm" page and your "search.cgi" are using different encoding/charsets (iso-8859-1 and windows-1252 respectively).
              Also, if I change the encoding/charset to windows-1252 on the search.cfm page, to match the search.cgi, it still doesn't display.

              Comment


              • #8
                Originally posted by wingnut144 View Post
                If I open up the search_template.html I don't see an encoding, do I need to add a <head> section and set the encoding there? Or somewhere else?
                Don't want to sound like I'm doubting you, but the search_template.html page that I can see on your site has a charset/encoding tag, so I'm not sure if you're familiar with what a HTML encoding tag looks like. Just in case you are not, I'll explain what I mean. Your search template file here:
                http://www.salleboise.com/search/search_template.html

                Contains the following:
                Code:
                <html>
                <head>
                [B]<meta http-equiv="content-type" content="text/html; charset=windows-1252" />[/B]
                 <title>Example Zoom search template page</title> 
                ...
                The meta "content-type" tag with the "charset" value is setting the page encoding as windows-1252.

                You also said that you changed the search.cfm page's encoding to windows-1252, but looking here:
                http://www.salleboise.com/search.cfm

                Your CFM page contains an invalid meta tag:
                Code:
                 <HEAD>
                  <META http-equiv="content-type" content="text/html;windows-1252">
                  <TITLE>Salle Boise &bull; Contact</TITLE>
                This is not correctly setting the page encoding. In fact, Internet Explorer has defaulted the page to UTF-8 (you can see this by clicking on "View"->"Encoding" and see that "UTF-8" has been checked.

                Please see the code earlier (from the search template page) for a proper example of how a charset meta tag should be specified.
                Last edited by Ray; Jun-14-2007, 01:55 AM.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment


                • #9
                  Originally posted by Ray View Post

                  Please see the code earlier (from the search template page) for a proper example of how a charset meta tag should be specified.
                  Ok, even with the search.cfm set up with a meta tag of:
                  <meta http-equiv="content-type" content="text/html; charset=windows-1252">, the 404 error still appears.....

                  Comment


                  • #10
                    Perhaps you should refresh the page in your browser. It looks like it is working fine from here.
                    --Ray
                    Wrensoft Web Software
                    Sydney, Australia
                    Zoom Search Engine

                    Comment

                    Working...
                    X