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!

curl misbehaving - cannot resolv hosts

Discussion in 'General Discussion' started by tskiller, Apr 16, 2006.

  1. tskiller

    tskiller Registered

    Joined:
    Jul 28, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Hey, curl is currently not resolving hosts at all, however ping from cli works fine.

    For example:

    PHP:
    <?php

      $ch 
    curl_init("http://www.google.com");

      if (!
    curl_exec($ch)) {
        echo 
    "This should display the Google home page<br>";
        echo 
    "Error number:<br>";
        if (
    curl_errno($ch))
         print 
    curl_error($ch);
        }

      
    curl_close($ch);

    ?>
    Should bring up the google home page. However, it just displays:

     
  2. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    this may or may not help but we had a issue with php fsockopen that was doing basically the same thing

    the fix was to remove the http:// and just use www.domain.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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