httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Hudson <>
Subject [users@httpd] no DNS resolution inside apache???
Date Fri, 10 Nov 2006 01:09:47 GMT
Hey List-

I'm stumped on a problem. I have the following server:

apache: 2.2.3 from ports
php4: 4.4.4 from ports and varios extensions from port loaded as a module
my apache conf file are virtually dentical to a test server housed at our 

the problem: the webserver can't do name resolution or hostname lookups. the 
problem came to light with some PHP scripts which are doing gethostbyname 
lookups. They aren't working. The scripts work when run from the CLI.

Turning on Hostnamelookups doesn't do anything and IP addresses are not being 
looked up according to my logs.

dns works:
ping internal and external hosts resolve correctly
dig / nslookup of internal and external hosts
Perl CGI (on above apache server) work fine and from the command line
PHP from the CLI work fin

dns doesn't work:
PHP gethostbyname / gethostbyaddr calls inside Apache don't work
Apache can't do hostnamelookups (yes, i uncommented 

DNS lookups work when looking up files from /etc/hosts

I've triple checked resolv.conf, hosts  and nsswitch.conf and can't find any 
issues there.

Anyone have the slightest clue as to where the problem could be? How to 
further troubleshoot? Right now I think it's a Apache "issue", but I haven't 
the slightest clue as to why.


Henrik Hudson
"God, root, what is difference?" Pitr; UF (

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message