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

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

    <?php
    $ip = gethostbyname('example.com');
    echo $ip;
    ?>

    from apache it does not resolve example.com 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 ?
     
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