Wamp fatal error no ca bundle

hi all

i just downloaded wampserver and installed it.

when i ran my script it showed me error

 Fatal error: Uncaught exception 'RuntimeException' with message ' in E:\wamp\www\gapi\google-api-client\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51

RuntimeException: No system CA bundle could be found in any of the the common system locations. PHP versions earlier than 5.6 are not properly configured to use the system's CA bundle by default. In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle to the 'verify' request option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not need a specific certificate bundle, then Mozilla provides a commonly used CA bundle which can be downloaded here (provided by the maintainer of cURL): https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path to the file, allowing you to omit the 'verify' request option. See http://curl.haxx.se/docs/sslcerts.html for more information. in E:\wamp\www\gapi\google-api-client\vendor\guzzlehttp\ringphp\src\Client\ClientUtils.php on line 58

after reading the error
i opened the below url in browser
http://docs.guzzlephp.org/en/latest/clients.html#verify
But it gave error saying
SORRY THIS PAGE DOESNOT EXIST

Then
i tried next step of mozilla ca bundle
https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt

it opened a ca-bundle file in text format which i saved in my E: Drive

Next step it says
you can set the ‘openssl.cafile’ PHP.ini setting to point to the path to the file

so i opened file located at
E:\wamp\bin\php\php5.4.16\php.ini

but i cant found “openssl.cafile” written anywhere in it ??
so what should i do ??

here is screenshot of the error

vineet

So, you have problems with both XAMPP and WAMP on your machine now. Is that right @vinpkl?

xampp didnt showed me this error.
it just forcily made me exit apache and close it

but wamp is showing this error.
its my first time using wamp today.

vineet

this time i placed two downloaded “ca files” in php directory and added this to php.ini

curl.cainfo="e:/wamp/php/cacert.pem"
openssl.cafile="e:/wamp/php/ca-bundle.crt"

but still same error ??

vineet

i added these two files in ini

curl.cainfo = "E:/wamp/bin/php/php5.4.16/cacert.pem"
openssl.cafile = "E:/wamp/bin/php/php5.4.16/ca-bundle.crt"

but when i echo

echo "openssl.cafile: ", ini_get('openssl.cafile'), "\n";
echo "<br>";
echo "curl.cainfo: ", ini_get('curl.cainfo'), "\n";

then on the screen its doesnt echo the value of openssl.cafile

openssl.cafile: 
curl.cainfo: E:/wamp/bin/php/php5.4.16/cacert.pem

why “openssl.cafile” location is not getting set in php.ini file ?

vineet

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.