cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with composer install

Solution Provider

Issues with composer install

Hello,

 

I'm having issues getting the php sdk to work for me.

 

My goal for now is to create a simple Sign Up form, but I'm unable to get any code running.

 

I have composer installed in my computer, and I'm using Xampp.

 

Inside the htdocs folder, I have a folder called cc. Inside I made a composer.json file with the following line:

 

{
"require": {
"constantcontact/constantcontact": "2.1.*"
}
}

 

Then I ran composer install.

Once the depencies are installed, I try testing the addOrUpdateContact.php file from the examples folder. I added my api key and access token, but I get this error:

 

Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException' with message 'cURL error 60: SSL certificate problem: self signed certificate in certificate chain' in C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php:127 Stack trace: #0 C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Array, Array, Array) #1 C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(96): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Array, Array, Array, Array, Resource id #72) #2 C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php(68): GuzzleHttp\Ring\Client\CurlHandler->_invokeAsArray(Array) #3 C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(54): GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array) #4 C:\xampp\htdocs\cc\vendor\guzzlehttp\ringphp\src\Client\Middleware.php(30): GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client\{closure}(Array) #5 C:\xampp\htd in C:\xampp\htdocs\cc\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51

 

All types of advice will be greatly appreaciated.

Thank you.

 

 

 

 

 

3 REPLIES 3
Honored Contributor

Re: Issues with composer install

Hello,

 

Based on the errors you're seeing, this is unrelated to Composer at all. It appears that your Xampp server is rejecting the security certificate for api.constantcontact.com. Do you recall approximately when you installed Xampp? It seems as though you may have a configuration in Xampp for a self-signed certificate and that is interfering with the ability to use PHP cURL to connect to the Constant Contact API.

 

There's unfortunately not an incredibly simple answer for this, as it's going to be a setting or configuration of your environment that's causing the error. If you're interested in getting some details about the security certificate in use for api.constantcontact.com, you can find the details here: https://www.sslshopper.com/ssl-checker.html#hostname=api.constantcontact.com

 

Please let me know if I can provide any additional information to help!

 

Sincerely,

Elijah G.
API Support Engineer
Solution Provider

Re: Issues with composer install

Thank you, Elijah!

 

The problem was the cetificate. I got my code to run on my actual website. I'm still unable to get it to run in xampp eventhough I just installed the latest version. 

 

Highlighted
Occasional Advisor

Re: Issues with composer install

I was able to resolve this same issue using the following StackOverflow post:

 

http://stackoverflow.com/questions/28858351/php-ssl-certificate-error-unable-to-get-local-issuer-cer...

 

 

Speficially, Mladen Janjetovic 's post.