PassMark Logo
Home » Forum

logging IP address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenny
    Member
    • Aug 2011
    • 20

    #1

    logging IP address

    I have logging working but the log does not record the IP address.

    Windows 2003, IIS
    CGI version
  • Ray
    Administrator
    • Dec 2004
    • 4357

    #2
    What do you see instead? Can you show us some examples from your log.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    • kenny
      Member
      • Aug 2011
      • 20

      #3
      2011-11-07, 16:14:19, , "sbc features", Matches = 21, AND, PerPage = 10, PageNum = 0, "Cat = Report Highlights", Time = 0.012, Rec = 0
      2011-11-07, 16:14:55, , "2011", Matches = 306, AND, PerPage = 10, PageNum = 0, "Cat = Report Highlights", Time = 0.013, Rec = 0
      2011-11-07, 16:20:05, , "iptv", Matches = 115, AND, PerPage = 10, PageNum = 2, "Cat = All", Time = 0.012, Rec = 0
      2011-11-07, 16:20:08, , "download", Matches = 381, AND, PerPage = 10, PageNum = 4, "Cat = All", Time = 0.012, Rec = 0
      2011-11-07, 16:20:10, , "2011", Matches = 306, AND, PerPage = 10, PageNum = 0, "Cat = Report Highlights", Time = 0.013, Rec = 0


      thx for looking

      Comment

      • kenny
        Member
        • Aug 2011
        • 20

        #4
        here is more info about our setup
        Pro Ed. Ver 6, build 1027

        thx

        Comment

        • Ray
          Administrator
          • Dec 2004
          • 4357

          #5
          We couldn't reproduce the problem here on our IIS server running on Server 2003 as well.

          It would be due to a certain setup or server configuration that leads to the REMOTE_ADDR environment variable not being specified by IIS. Google online and there are various issues related to this. Hard for us to determine since we don't have that situation here and REMOTE_ADDR is always specified.

          If you can dump out the environment variables available in your setup of IIS, it would help.

          You might want to try this Microsoft Knowledge Base article suggestion to dump out the environment variables:
          http://support.microsoft.com/kb/150826

          Note however that it uses a .cmd batch file, and it doesn't explain how to enable this for IIS. I believe you need to add ".cmd" as a MIME type and map the extension to "C:\Windows\System32\cmd.exe".

          There's this other article on how to enable .CMD files to run via IIS, but I couldn't get it to work:
          http://support.microsoft.com/kb/164674
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment

          • kenny
            Member
            • Aug 2011
            • 20

            #6
            I tested Zoom v7 using the ASP method and the IP address is logged correctly.
            If the IP address is passing correctly in the version could it be something wrong with the CGI method?

            Comment

            • David
              Administrator
              • Dec 2004
              • 4714

              #7
              As we have tested the CGI here with IIS, and it works. We think the problem is with your IIS config. But we don't know which IIS setting it is.

              If you want to get to the bottom of the issue following Ray's suggestion would be best.

              Comment

              • kenny
                Member
                • Aug 2011
                • 20

                #8
                I did a lot of testing and here is what I found.

                using the search.cgi with the "Link back URL" left blank the remote IP address shows up in the log file.

                embedding the search.cgi file inside an ASP (index.asp) with the "Link back URL" set to index.asp everything but the remote IP address is written to the log.

                Followed the directions from this link to embed the cgi file.
                http://www.wrensoft.com/zoom/support/faq_ssi.html#ssi_cgi

                Comment

                • Ray
                  Administrator
                  • Dec 2004
                  • 4357

                  #9
                  Ah, that makes sense. We didn't know you were calling the CGI from an ASP file.

                  This would mean that the ASP page must carry the REMOTE_ADDR environment variable across to the CGI.

                  I just had a look at the ASP example on our FAQ page, and we didn't set the environment variable for REMOTE_ADDR like we did in the PHP example.

                  You will need a line like this:

                  env.Item("REMOTE_ADDR") = Request.ServerVariables("REMOTE_ADDR")

                  Before you execute "search.cgi" from your ASP page.

                  We'll update the FAQ now so this is included. Let us know if it fixes your problem.
                  --Ray
                  Wrensoft Web Software
                  Sydney, Australia
                  Zoom Search Engine

                  Comment

                  • kenny
                    Member
                    • Aug 2011
                    • 20

                    #10
                    that did it!
                    thx

                    Comment

                    Working...