in reply to Re^2: Geo::Coder::Google running as cgi
in thread Geo::Coder::Google running as cgi

The webserver (apache/httpd) runs as some user (ex apache) which is not the same user (you) in the shell, so permissions can be different, %ENV ....
  • Comment on Re^3: Geo::Coder::Google running as cgi

Replies are listed 'Best First'.
Re^4: Geo::Coder::Google running as cgi
by Anonymous Monk on Sep 14, 2008 at 10:59 UTC
    That makes sense... but what is the differences? The paths?

    CGI
    PATH = /sbin:/usr/sbin:/bin:/usr/bin

    shell
    PATH = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    I assume it can read the perl modules ok, but it can't either resolve the DNS (where is that done??), or access out is blocked for the apache user (how do I check that?).
    Thanks in advance.
      su -l -c 'ping www.google.com' apacheuser

      Another thing to test is whether there are some perl modules in /usr/local/lib/perl5 (even though such a problem should have been reported in the apache log files already, I think)

        No good.
        Apache is configured (as default) to run as nobody. So,
        su -l -c 'ping www.google.com' nobody
        This account is currently not available

        cat /etc/passwd
        nobody:x:99:99:Nobody:/:/sbin/nologin

        looks like loging in to test is not possible