Results 1 to 10 of 10

Thread: CGI script blocked by proxy. Need help!

  1. #1

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510

    CGI script blocked by proxy. Need help!

    I have a CGI script that contacts another website to retrieve some information. I have now moved my website internally instead of on a virtual host. I am running Apache web server 1.3 and have EVERYTHING working except this one part of the script, because we use a proxy server here and it is blocking the script from contacting the other site. Here is the code:

    Code:
    $port = 80;
    $remote = "www.anothersite.com";
    $iaddr = inet_aton($remote);
    $paddr = sockaddr_in($port,$iaddr);
    $function = "GET";	#Type of HTTP 
    
    connect(S,$paddr) or die $!;
    It dies everytime... because the proxy server won't let it out. How can I configure this to work with my proxy server??

    Thanks for any help!

    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  2. #2

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    Cool! Thanks!

    I am setup just like you are, localhost... everyone at the office just types my internal ip address and the site pops up.

    Thanks again... I am looking forward to what you find!

    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  3. #3
    scoutt
    Guest
    is inet_aton a subroutine you built?

  4. #4

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    No, it is a function within Perl I am asssuming. I looked it up on the internet by putting inet_aton in google and it tells what it does.. can't remember off hand though.
    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  5. #5
    scoutt
    Guest
    well mine said undefined function so I was curious

  6. #6

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    ok.. yeah i think it is a function of the Socket library??? i have this at the top of the script as well

    use Socket ();
    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  7. #7
    scoutt
    Guest
    oh ok i will try that as well.I will get back to you bu tI think I will still stand with what I said the first time.

  8. #8

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    cool.. thanks.

    i have been reading a little more in depth and i think you are correct about it not allowing outside the intranet...

    oh well... i have red hat 7.3 on the way... then we will see if i can get it working.

    thanks for your advice.

    looking forward to your response.

    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  9. #9
    scoutt
    Guest
    I still get this error

    Undefined subroutine &main::inet_aton called at c:\PROGRA~1\APACHE~1\APACHE\HTDOCS\CGI-BIN\OUT.PL line 6

    and that is the $iaddr = inet_aton($remote); line

  10. #10

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    Hhhmmm... I think my experience is not good enough to figure this out easily.

    I am going to try it on the other side of the proxy server and verify that it is Apache not letting me out and not the code.

    Thanks so much for your help!!

    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

Posting Permissions

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



Click Here to Expand Forum to Full Width