Error:SSL certificate error: unable to get local issuer certificate

0 votes

When I try to use the Mandrill API, I'm getting the following error:

Uncaught exception 'Mandrill_HttpError' with message 'API call to messages/send-template failed: SSL certificate problem: unable to get local issuer certificate'
Apr 15 in PHP by kartik
• 11,890 points
71 views

1 answer to this question.

0 votes

Hii,

If you don't have access to php.ini, adding this code (after your $ch = curl_init(); line) works for me:

$certificate_location = "C:\Program Files (x86)\EasyPHP-Devserver-16.1\ca-bundle.crt"; // modify this line accordingly (may need to be absolute)
curl_setopt($ch, CURLOPT_CAINFO, $certificate_location);
curl_setopt($ch, CURLOPT_CAPATH, $certificate_location);

Then, you will just need to download ca-bundle.crt and save it to location you specified in $certificate_location.

Hope this works!!

Thank You!!

answered Apr 15 by Niroj
• 23,950 points

Related Questions In PHP

0 votes
1 answer

How to get xdebug var_dump to show full object/array?

Hello. These are configurable variables in php.ini: ; with ...READ MORE

answered Apr 7 in PHP by Niroj
• 23,950 points
53 views
0 votes
1 answer

How to get the client IP address in PHP ?

Hello, Here is a code sample of a good ...READ MORE

answered Apr 8 in PHP by Niroj
• 23,950 points
245 views
0 votes
1 answer

Error:Lost connection to MySQL server at 'reading initial communication packet', system?

Hello, You have to follow the below steps: bind-address ...READ MORE

answered Apr 9 in PHP by Niroj
• 23,950 points
171 views
0 votes
1 answer

I am trying to run following command But I end up with an error :

Hello Nishant, You are getting this error because your ...READ MORE

answered Apr 9 in PHP by Niroj
• 23,950 points
31 views
0 votes
1 answer

What is Laravel framework? Why one should use Laravel?

Laravel is a PHP web-framework; it utilized ...READ MORE

answered Mar 17 in Laravel by Niroj
• 23,950 points
71 views
0 votes
1 answer

How to download and install Lavavel framework?

Hey @kartik, First you must have xampp install ...READ MORE

answered Mar 17 in Laravel by Niroj
• 23,950 points
67 views
0 votes
1 answer

How can we get started with Laravel through Xampp?

Hii, First you need to start Apache and ...READ MORE

answered Mar 17 in Laravel by Niroj
• 23,950 points
32 views
0 votes
1 answer

What are the important directories used in a common Laravel application

Hey @Kartik. Directories used in a common Laravel ...READ MORE

answered Mar 17 in Laravel by Niroj
• 23,950 points
34 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19 in PHP by Niroj
• 23,950 points
37 views
0 votes
1 answer

How to get thumbnail of youtube video from youtube API?

Hii @kartik, If you want the biggest image ...READ MORE

answered Apr 1 in PHP by Niroj
• 23,950 points
123 views