I tried to use this module on a server running a new-ish version of curl, and it didn't work.
The reason is that the connection happens over https, but newer versions of curl don't ship with any certs for SSL verification (see http://stackoverflow.com/questions/6400300/php-curl-https-causing-except... for more details).
I was able to get this to work in my custom module with code like this:
/**
* Implements hook_exact_target_api_curl_alter().
*/
function MY_MODULE_exact_target_api_curl_alter($ch) {
// Alter the cURL handler to use a CA cert file shipped with this module, so
// that it will be able to contact the Exact Target API over HTTPS when
// running on a server with newer versions of libcurl.
curl_setopt($ch, CURLOPT_CAINFO, drupal_get_path('module', 'MY_MODULE') . '/cert/cacert.pem');
}
where I downloaded the cacert.pem file from http://curl.haxx.se/docs/caextract.html as described at the above link.
So the question is, should this module do something to fix it also? The cacert.pem file is pretty huge, and shipping the Exact Target API module with that might not make a whole lot of sense. However, perhaps it could at least look for that file in a pre-defined location (and have instructions in README.txt or in the user interface for downloading it and putting it there).
Comments
Comment #1
nonsieI'm in favor of documenting this issue in README.txt for now with instructions how to get around this issue using hook_exact_target_api_curl_alter().
The purpose of the module is to communicate with Exact Target API not get around curl issues. This is why hook_exact_target_api_curl_alter() was added in the first place.
Comment #2
peterx commentedA note in case Curl presents other problems, I could not get Curl installed on a server for my work today so I copied the API function and replaces curl_init with some changes along the following lines. It works for the small number of things I tried.
Comment #3
nonsieAdded to README.txt for anyone who should run into this issue.