in reply to LWP running as cgi

I recently wrote a post about this exact problem. As merlyn says, it sounds like a DNS problem: your system is not resolving 'yahoo.com' to an IP address. This may be on the networking side (e.g., you're not connected, or you don't have a valid DNS server defined) or it may be a problem in your code (in principle, that is; it works fine for me.) Assuming you've got a reasonable OS, you can test DNS with "host", "dig", or a bunch of other tools.


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

Replies are listed 'Best First'.
Re^2: LWP running as cgi
by Anonymous Monk on Sep 21, 2008 at 16:20 UTC
    Thanks all,
    at least I now know what to look for. FYI it is Fedora 8, default install
    sudo -u apache dig http://www.yahoo.com works
    Interestingly, when I do:
    sudo -u apache ./lwptest.cgi
    it works, so I don't think it's related to the user permissions, pushing me back to the idea of paths.
      You are using sudo, so you run this as admin. Of course that will not reveal any permission problems of the webserver-user. Do
      su www-data #or whatever account the apache runs under
      and try above commands again.


      holli, /regexed monk/
        the -u option of sudo causes it to run as the specified user, in this case 'apache'. If the apache account is set to nologin, it is the only way to run as the apache user.