How do we enable curl_init()

Discussion in 'HTML / PHP / JavaScript / CSS' started by elohimreign, Jan 15, 2011.

  1. I have a php page that requires curl_init(). The knowledge base says it is ebabled, yet phpinfo() makes no mention of it (on my site at least). Is there a setting in the ini file that refers to the dll for this that needs to be modified, do we need to make a support request, or something else?

    I am on windows 7.

    Fatal error: Call to undefined function curl_init()...

    I found this:
    If this is a Windows based system, CURL can be enabled by uncommenting the curl extension line in the php.ini file - extension=php_curl.dll and restarting the web server.
    Here, but it's dated: http://www.hotscripts.com/forums/php/26167-fatal-error-call-undefined-function-curl_init.html

    Thanks.
     
  2. curl_init

    I am running on the discountASP.net Windows 2008 server and it seems like curl has been enabled. Try the following "test.php". You should get a message from the "curl web page" and a message from the original web page.

    You should be able to see this working at the following link.

    http://http://www.doggiedudes.net/Learning/phpcurl001.php

    <html>
    <body>
    <hr />
    <?php
    //This is a comment
    $ch = curl_init("http://www.doggiedudes.net/");
    curl_exec($ch);
    curl_close($ch);
    ?>
    <hr />
    <?php
    $txt="Hello World from phpcurl001";
    echo $txt;
    ?>
    <hr />
    </body>
    </html>
     

Share This Page