fsockopen() problem - urls not resolving

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
Php function fsockopen() does not resolve urls which are on
different server then localhost


hostname = um-487.conepuppy.com


I've checked /etc/resolv.conf


domain um-487.conepuppy.com
search um-487.conepuppy.com
nameserver 66.154.0.2 - datacenter ns
nameserver 69.61.22.251 - local ns


Any ideas what could make problems for fsockopen() not resolving
urls?

Bind is working fine.


/etc/hosts is fine too:

# Do not remove the following line, or various programs
# that require network functionality will fail.
69.61.22.250 um-487.conepuppy.com um-487
127.0.0.1 localhost



If I put IP instead of url for fsockopen() argument it works fine. Box is running latest CentOS.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,466
31
473
Go on, have a guess
Try swqitching round the nameserver entries in your /etc/resolv.conf so that it is using your named for DNS resolution. Then check that the domain actually resolves:

host domain.com
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
When I add my first name server IP for resolver.conf first nameserver entry, fsock() resolvers urls but I can't ping anything.