Results 1 to 10 of 10

Thread: logging IP address

  1. #1
    Join Date
    Aug 2011
    Posts
    20

    Default logging IP address

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

    Windows 2003, IIS
    CGI version

  2. #2
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    3,585

    Default

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

  3. #3
    Join Date
    Aug 2011
    Posts
    20

    Default

    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

  4. #4
    Join Date
    Aug 2011
    Posts
    20

    Default

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

    thx

  5. #5
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    3,585

    Default

    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

  6. #6
    Join Date
    Aug 2011
    Posts
    20

    Default

    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?

  7. #7
    Join Date
    Dec 2004
    Location
    Sydney
    Posts
    4,157

    Default

    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.

  8. #8
    Join Date
    Aug 2011
    Posts
    20

    Default

    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

  9. #9
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    3,585

    Default

    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

  10. #10
    Join Date
    Aug 2011
    Posts
    20

    Default

    that did it!
    thx

Posting Permissions

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