I have a small problem on one of our servers - web server. From scripts (PHP and/or Perl) the domains cannot be solved to an IP address. From console everything works fine but from any sort of script the domain name cannot be solved - no matter is that domain is hosted on the same webserver or not.
Anyway, the domain is solved if I manualy put a record in /etc/hosts but this is not a solution as I don't know what domains every client accesses.
Does anybody have an ideea why is this strange behaviour ?
Is this in the apache log ? This is usually an PHP error message. Still, you haven't shown your scripts, what DNS functions are implemented ? gethostbyaddr, gethostbyname , ENV{HOSTNAME} ?
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /home/test/public_html/test.php on line 3
Warning: fsockopen() [function.fsockopen]: unable to connect to www.unix.com:80 (Unknown error) in /home/test/public_html/test.php on line 3
Error creating socket
On another server it works perfectly - the diference is that the apache version is 1.3, not 2.0.