The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP DNS Resolve issues

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

  1. joeblack

    joeblack Registered
    PartnerNOC

    Joined:
    May 14, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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:
    43
    Likes Received:
    0
    Trophy Points:
    6
    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