This error is only present on my webserver online. I am using a updated cacert.pem and referencing it in my php.ini
file in my localhost server.
My question is how this could be done on a typical web server? (by how I mean referencing the cacert.pem
via the php.ini
)
Alternatively is there a way I can define it within my function or Mailchimps API function that i am using which was installed via composer?
My current function:
bootstrap.php
require_once __DIR__ . '\..\..\lib\Cake\Network\Http\HttpSocket.php';
Controller:
//////////////////////////MAILCHIMP///////////////////////
$Socket = new HttpSocket(array('ssl_cafile' => CAKE . 'Config' . DS . 'cacert.pem', ));
$api_key = "xxxxxxxxxxxxxxxxxxxxxxxx";
$list_id = "xxxxxxxxx";
$merge_vars = array('FNAME'=>$this->request->data['Subscriber']['first_name'], 'LNAME'=>$this->request->data['Subscriber']['last_name']);
$Mailchimp = new Mailchimp( $api_key );
$Mailchimp_Lists = new Mailchimp_Lists( $Mailchimp );
$subscriber = $Mailchimp_Lists->subscribe($list_id, array('email' => $this->request->data['Subscriber']['email']), $merge_vars);
/////////////////////////////////////////////////////////////