CMIS error - return [0]

If you are using the CMIS API module and your get the return[0] error, this solution might work for you.

First, ensure that cURL is active in your PHP.ini.

Curl is active in the php.  

Second, if you are running a windows machine, ensure that curl is installed on your PC.  Double check that the path is set in the environmental variables.  Also check to make sure that pesky certificate is there.  We did this.  We are not sure that this was part of the solution, so take it as it is.

Finally, We had to alter the code on the Drupal CMIS module.  The file to alter is the cmis/cmis_common/cmis_common.module file.

After the if(!dry_run) line, we added the following:

curl_setopt ($session, CURLOPT_CAINFO, "c:/curl/cacert.pem");

curl_setopt CMIS API Drupal Response 0
Line 88, a comment line, and line 89, the curl_setopt lines were added.

The $session variable is created on line 56ish.  The second parameter of the curl_setopt is the path the curl certificate.

If you have this problem and this solves, please contact us!  We want to know there are others out there that had this problem.  Maybe we can start a club?  We can have t shirts made!