CGI Variables CGI.REMOTE_ADDR

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default CGI Variables CGI.REMOTE_ADDR

    I am using cold fusion MX and Iplannet. Is it possible to find the client IP
    Address using the CGI variable, CGI.REMOTE_ADDR
    in CFC. it is showng the server IP address where the CFC is published. It
    works perfectly in a CFM page. But it is not working in CFC. Please help to
    find the issue.

    Thanks



    bijuvc Guest

  2. Similar Questions and Discussions

    1. $ENV{'REMOTE_ADDR'}
      Dan Muey wrote: I'm no security expert, but how can these be spoofed? They don't come from the request headers, but are derived from the TCP...
    2. #24515 [Fbk->NoF]: $_SERVER[remote_addr] different to $remote_addr
      ID: 24515 Updated by: sniper@php.net Reported By: phpbug at easihosting dot co dot uk -Status: Feedback...
    3. #24515 [Opn->Fbk]: $_SERVER[remote_addr] different to $remote_addr
      ID: 24515 Updated by: sniper@php.net Reported By: phpbug at easihosting dot co dot uk -Status: Open +Status: ...
    4. #24515 [Fbk->Opn]: $_SERVER[remote_addr] different to $remote_addr
      ID: 24515 User updated by: phpbug at easihosting dot co dot uk Reported By: phpbug at easihosting dot co dot uk -Status: ...
    5. Server variables Remote_ADDR / REMOTE_HOST ? - Difference
      All, I am trying to log the IP address of visitors to my site using ASP as follows <% Dim strIPAdd Dim srtHostName srtIPAdd =...
  3. #2

    Default Re: CGI Variables CGI.REMOTE_ADDR

    Wierd. It works for me.

    Maybe you could work around this by having your Application.cfm or Application.cfc copy REMOTE_ADDR to the Request scope.

    MikerRoo Guest

  4. #3

    Default Re: CGI Variables CGI.REMOTE_ADDR

    It is working if I call the cfc as componet.

    But it is not working If I call that cfc as web services.
    It might be a bug. Lets see what macromedia say about it.


    Cold fusion Component (test1.cfc)

    <cfcomponent>
    <cffunction name="myMethod" returntype="string" access="remote">
    <cfreturn cgi.REMOTE_ADDR>
    </cffunction>
    </cfcomponent>


    Test case 1- Calling test1.cfc as a web service in a CFM page.

    <cfinvoke webservice="http://server.v/app/test/test1.cfc?WSDL"
    method="myMethod"
    returnvariable="test">
    </cfinvoke>
    <cfdump var="#test#">

    The output will be the server IP address where the web service published.




    Test case 2- Calling test1.cfc as a component in a CFM page.

    <cfinvoke component="test1" method="myMethod" returnvariable=" test >
    </cfinvoke>

    <cfdump var="#test#">


    The output will be the client IP Address . Working perfectly.

    bijuvc Guest

  5. #4

    Default Re: CGI Variables CGI.REMOTE_ADDR

    Hi Macromedia,

    Could you please answer this issue. I posted it a week ago. Nobody did respond.


    Thanks

    bijuvc Guest

  6. #5

    Default Re: CGI Variables CGI.REMOTE_ADDR

    Originally posted by: bijuvc
    It is working if I call the cfc as componet.

    But it is not working If I call that cfc as web services.
    It might be a bug. Lets see what macromedia say about it.

    When you call a webservice, your server sort of performs a cfHTTP (a
    http-request) to the webservice.
    So the webservice will always have your server as client, cgi-remote_addr
    within the webservice will always be your servers IP.

    Not a bug, rather basic understanding of the technique below.


    Stefan K. Guest

  7. #6

    Default Re: CGI Variables CGI.REMOTE_ADDR

    This is a developers forum, not help-forum from Macromedia.
    Don't expect an answer from Macromedia itself, it happens, but rarely.

    Think:
    Would Macromedia have help-forum with experienced developers assisting with
    all these problems FOR FREE?

    Stefan K. Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139