Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Unanswered: client ip address using HTTP Server

    Hi, I'm trying to get the client IP address, but by using the sys_context('userenv','ip_address') function, I only get the IP address of the application server that stablished the connection and what I really want is the IP address of the machine where the browser is executing. We are currently developing applications with Oracle Forms Builder 6i, so if there is any ideas on how to do it, I'll be very grateful

    Many thanks


    Juan Pane

  2. #2
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    Try this:

    ip_address_v := OWA_UTIL.get_cgi_env('REMOTE_ADDR')
    JoeB
    save disk space, use smaller fonts

  3. #3
    Join Date
    Feb 2005
    Posts
    4
    thanks, but when I run that command I get the follewing error
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 323
    ORA-06512: at "JUAN.TEST_IP", line 6
    ORA-06512: at line 1
    Is there anything I'm missing?

  4. #4
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    Juan,

    Please post your code too. I imagine the problem is that you are returning the data into a numeric variable instead of a varchar2 variable...

    Your code should look something like this:

    Code:
    CREATE OR REPLACE PROCEDURE myProc IS
       ip_address_v VARCHAR2(16);
     BEGIN
       ip_address_v := OWA_UTIL.get_cgi_env('REMOTE_ADDR');
       -- other stuff you need to do
     END;
    /
    JoeB
    save disk space, use smaller fonts

Posting Permissions

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