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!

Problem with gethostbyname() php4 freebsd

Discussion in 'General Discussion' started by Piotr Kujawka, Sep 28, 2007.

  1. Piotr Kujawka

    Piotr Kujawka Registered

    Jan 31, 2007
    Likes Received:
    Trophy Points:
    We are using php4 4.4.7 with freebsd and as I see when I run simple script:

    $ip = gethostbyname('');
    echo $ip;

    from apache it does not resolve to an IP address. But when You try to run the same script like php script.php it works perfectly.
    Any idea why running script from apache does not resolve domain corectly ?

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