hostname nor servname provided, or not known



Hi,

I have the weirdest problem on using the latest apache and php versions. Whenever i call a socket function such as fsockopen() i see error messages. Also i can't connect to the mailbox through squirrelmail. The messages are:

warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in ... on line 2
fsockopen() [function.fsockopen]: unable to connect to http://www.cnn.com:80 in ... on line 2

These messages to me suggests that something goes wrong while resolving either the hostname (which is atlanta.globalwebhosting.nl) or a remote host. However, i can resolve the hostname and any other host just fine on the commandline.

I checked the contents of /etc/hosts, /etc/resolv.conf, httpd.conf and php.ini. Contents seems fine.
allow_url_fopen is ON in php.ini
I recompiled apache, php and zend.
I checked whether DNS is correctly configured via http://www.sidn.nl
I disabled the firewall.

Problem remains. Any suggestions?

Thanks,
Floris
.



Relevant Pages