Is the new API (v.3) compatible with PHP 4, or will it only work with PHP 5?
I'm asking because when I was testing the client/create.php file and got the following error back:
Notice: Error making request with curl_error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134) in /mysite/lib/cm/class/transport.php on line 85
Result of POST /api/v3/clients
Failed with code 0
This is on a server running PHP 4.4.9.
Never mind, found the fix to the curl/SSL problem elsewhere.
I can confirm, however, that v.3 of the API does appear to work fine with PHP 4.
A few people are having trouble with SSL through the API v3 PHP wrapper. The problem is that cURL does not include any root certificate authorities by default.
We will release a new version of the PHP wrapper in the next few weeks that should fix this problem.
In the meantime you can use http without SSL by passing 'http' in to the wrapper creation methods like this:
$wrap = new CS_REST_Campaigns(NULL, 'Your API Key', 'http');
At the moment this is our recommended workaround for anyone who is having trouble with SSL.
The other option is for you to install a certificate yourself. This link (towards the bottom) has instructions on how to do this with the root CA package from your browser.
Thanks for the info David. Really helped me out of a jam.
Just to follow up, this issue has been fixed in the current version of the PHP wrapper.
I just downloaded the latest PHP wrapper this morning, and when I first started workign wiht the API, everything worked fine. Then I came back after lunch, and without changing any code, I got this error - any idea what the problem coudl be? When I added the 'http" in with the call, it works fine
@tobyb do you mean that as of some point yesterday the PHP wrapper was updated? I downloaded it yesterday morning and am running into this error. The work-around posted above does work at least :-)
It has not really worked. I tried to get updated PHP wrapper yesterday, but this error is not fixed.
The updated code only fixed 'required_once some files'. Is it?
Update: Issue seems to have resolved itself
I seem to be running into this issue too, using PHP 5.2
Similar to natatkinson, I began working with the API about an hour ago and it worked fine. Now, I'm running into the same issues and I haven't made any changes to the code on my site.
Severity: User Notice Message: Error making request with curl_error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Filename: class/transport.php Line Number: 90
I only downloaded the PHP Wrapper a couple of hours ago so it should include the fix that Toby is talking about... I'm just not sure what's changed in the hour since I began working with the API. Any tips?
We pushed a change to the wrapper mid December which included the root CA certificate for openSSL to use. The changes made are here:
We're looking into the issue and will let you know when the problem has been fixed.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.Get started for free