Call to undefined function curl_init()

Most likely curl support is not enabled.

You can check by creating a .php file with a phpinfo(); command in it. Browse to this and search/look for curl on the resulting page. If support is enabled, there will be a listing for it.

If this is with a hosting company, you will need to have them install/enable it. 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. If this is Unix/Linux, PHP must be compiled with CURL support and the libcurl library must be installed.

4 thoughts on “Call to undefined function curl_init()

  1. In order to use curl in your command line script, you need to load the library explicitely. (in case of browser scripts, it is loaded implicitely.)

    You need to add following line of code, so that curl extension is loaded in your command line script.:
    dl(‘php_curl.dll’);

    This way you can use your curl code seamlessly.

Leave a reply to samsami2u Cancel reply