Skip to content

Commit 957741e

Browse files
committed
Adds troubleshooting notes of SSL
1 parent e89d812 commit 957741e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Alternatively you can just download the MailChimp.php file and include it manual
2828
include('./Mailchimp.php');
2929
```
3030

31-
3231
Examples
3332
--------
3433

@@ -55,3 +54,8 @@ $result = $MailChimp->post('lists/b1234346/members', array(
5554
));
5655
print_r($result);
5756
```
57+
58+
Troubleshooting
59+
---------------
60+
61+
If your server's CA root certificates are not up to date you may find that SSL verification fails and you don't get a response. The correction solution for this [is not to disable SSL verification](http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/). The solution is to update your certificates. If you can't do that, there's an option at the top of the class file. Please don't just switch it off without at least attempting to update your certs -- that's lazy and dangerous. You're not a lazy, dangerous developer are you?

src/MailChimp.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
* This probably has more comments than code.
1010
*
1111
* @author Drew McLellan <drew.mclellan@gmail.com>
12-
* @version 2.0
12+
* @version 2.0.5
1313
*/
1414
class MailChimp
1515
{
1616
private $api_key;
1717
private $api_endpoint = 'https://<dc>.api.mailchimp.com/3.0';
18-
public $verify_ssl = true;
18+
19+
/* SSL Verification
20+
Read before disabling:
21+
http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/
22+
*/
23+
public $verify_ssl = true;
1924

2025
/**
2126
* Create a new instance

0 commit comments

Comments
 (0)