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

    This way you can use your curl code seamlessly.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s