Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

fsockopen() problem - urls not resolving

Discussion in 'General Discussion' started by MMarko, Apr 29, 2006.

  1. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    166
    When I add my first name server IP for resolver.conf first nameserver entry, fsock() resolvers urls but I can't ping anything.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    166
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice