fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed

Discussion in 'PHP' started by j0ned, Dec 21, 2007.

  1. #1
    Wow - this is very frustrating.

    http://www.nullamatix.com/phptest.php throws the error mentioned in the subject, but if I execute:

    # php5 /path/to/script/phptest.php
    Connected!

    I've even SU'd to www-user, executed the command above, and:
    Connected!

    So if a request from the URL is being made as www-user, why won't it say Connected in the browser??

    Here's some background:
    chrooted environment
    /chroot/etc/hosts exists
    /chroot/etc/resolv.conf exists
    php5 (fastcgi)
    Linux 2.6.18

    Here's the output from the following:
    chroot /chroot
    $ strace php5 users/nullamatix.com/http/phptest.php 2> stracephp.txt
    exit
    #

    http://www.nullamatix.com/stracephp.txt

    Anyone have any ideas WTF is going on? WHY IP addresses resolve and hostnames don't when a script is executed from the browser??? And by the way, IPTables is configured to allow Outbound TCP connection attempts on port 465.

    Thanks
     
    j0ned, Dec 21, 2007 IP