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!

PHP DNS Resolve issues

Discussion in 'Bind/DNS/Nameserver' started by joeblack, Jul 9, 2008.

  1. joeblack

    joeblack Registered
    PartnerNOC

    Joined:
    May 14, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Hi

    I am experinceing a very strange problem with one of my servers.

    This is what the server is and running

    OS: FreeBSD 6.2
    WHM 11.23.2
    cPanel 11.23.4-R26120
    Apache 2.2
    PHP: 5.2.6

    The php code I am using is:
    $hostname1 = gethostbyaddr("xx.xx.xx.x");

    Now what is happeing is PHP can resolve hosts / IPs when the info existst in /etc/hosts , but if not. PHP does not resolve.

    if I run said php file via CLI it works fine. I have run easyapache twice.

    Getting my clients to charge to curl is a no go as the DNS lookups should work.

    anyone else had this problem and how did you fix it ?

    Thanks

    Joe :D
     
  2. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    156
    Same problem

    I don't know what is going on, but you are not alone. Probably some dumb suExec issue.

    Brad
     
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