php / curl / gracenote ERROR searchTrack / get release Date

 include("../Vendor/phpGracenote/Gracenote.class.php");

 $clientID = ' my Key ';
 $clientTag = ' my Tag ';
 $api = new Gracenote\WebAPI\GracenoteWebAPI($clientID, $clientTag);
 $userID = $api->register();



 $results = $api->searchTrack("Kings Of Convenience", "Riot On An Empty Street", "Homesick", Gracenote\WebAPI\GracenoteWebAPI::BEST_MATCH_ONLY);

 pr($results);

I only get an error:

cURL returned an error when trying to make the request. Error: An Internal Error Has Occurred.

exception: code=2003, message=cURL returned an error when trying to make the request., ext=60

I think the problem is, that the i first must register my client information in order to get a userID.

 $userID = $api->register();

But i get this Error and don't now what i can do...

... in the GracenoteError.class.php:

const HTTP_RESPONSE_ERROR      = 2003; // A cURL error that wasn't a timeout or HTTP400 response.

Seems like a cURL SSL certificate issue. I resolved the problem by doing following:

  1. Go to https://curl.haxx.se/ca/cacert.pem, copy the whole page and save it as "cacert.pem" in a folder of your choice.
  2. Open your php.ini, search for "curl.cainfo" and insert "path\to\your\cacert.pem". (Or simply insert "curl.cainfo = "path\to\your\cacert.pem" if no "curl.cainfo" found.)
  3. Restart your server, and you should be good to go.