To determine if the cURL extension is enabled, run the following code on your server:

<?php
var_dump(curl_version());
?>

Success! - If cURL exists and is enabled it should return something that looks like this:

PHP version 4 example successful result:

string(54) "libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13"

PHP version 5.1 example successful result (returns an array)

Array
(
   [version_number] => 461570
   [age] => 1
   [features] => 541
   [ssl_version_number] => 9465935
   [version] => 7.11.2
   [host] => powerpc-apple-darwin6.8
   [ssl_version] =>  OpenSSL/0.9.7d
   [libz_version] => 1.1.3
   [protocols] => Array
       (
           [0] => ftp
           [1] => gopher
           [2] => telnet
           [3] => dict
           [4] => ldap
           [5] => http
           [6] => file
           [7] => https
           [8] => ftps
       )

)

Failure — if it doesn’t exist you’ll see an error message like this:

Fatal error: Call to undefined function: curl_version() in /path/to/sites/tdavid/php/examples/curl_version.php on line 5

In this case if you have the right access permissions (usually this is root access) you can edit the php.ini file. Here is instructions on how to locate the php.ini file.

You can edit the php.ini on Linux via ssh.

using ssh to edit the php.ini and enable the curl.dll extension

The section of the php.ini that refers to cURL is located in the Windows Extensions section, pictured above.