Curl issue in PHP

Discussion in 'Apache' started by hostrs.com, Jan 23, 2010.

  1. #1
    Hello. No matter what I try, I have looked everywhere online, I cannot get curl to work on my server. Here is a test page: 64.120.148.102/~leechdl/a.php

    does anyone know what to do? I uncommented ; from cpanel where php_curl.ddl is. I also recompiled php with curl enabled. I did some much stuff,still not working!!
     
    hostrs.com, Jan 23, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    So if you try the following which is more or less from http://uk3.php.net/manual/en/function.curl-init.php what do you get?
    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://atlantichosting.net/");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    
    echo "This is the output from curl<br /><br /><br />\n";
    
    curl_exec($ch);
    curl_close($ch);
    ?>
    Code (markup):
     
    tolra, Jan 24, 2010 IP
  3. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #3
    Hello,

    What exact error message you are getting ? Could you please paste error logs here
     
    Last edited: Jan 25, 2010
    hostechsupport, Jan 25, 2010 IP
  4. hostrs.com

    hostrs.com Peon

    Messages:
    157
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The problem was that cpanel was installed on the server. I tried everything to get it installed outside cpanel, then i figured out you can install in in WHM.
     
    hostrs.com, Jan 27, 2010 IP