I am working on Zend-Framework 1.12
and had to make an https
request from the application. I did it by the following way:
$client = new Zend_Http_Client($url);
$client->setAdapter($adaptor);
$client->setConfig(array('keepalive' => true));
$reCaptchaData = json_encode(array());
$client->setRawData($reCaptchaData, 'application/json');
$response = $client->request('POST');
I was getting errors like:
Error in cURL request: SSL certificate problem: unable to get local issuer certificate
Found that I had to add the CA certificates, I downloaded one and added its path to my php.ini
.
curl.cainfo="path"
openssl.cafile="path"
It works fine.
- But can't I add this to my
application.ini
? When I try it there it doesn't work. - Does
application.ini
work as an extension ofphp.ini
? But can't load modules or certificates, because that this done by Apache on a restart? Apache reads thephp.ini
on a restart and loads everything (I have the path for myphp.ini
inhttpd.conf
)?