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.

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:
    1
    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