Error: SSL certificate problem, verify that the CA cert is OK

The reason for this error is that Curl performs SSL certificate verification by default, using a “bundle” of Certificate Authority (CA) public keys (CA certs) and the CA that issued the certificated for the server is not in the default bundle.

  1. Specify an alternate file using the CURLOPT_CAINFO option.  The CA for is, Inc.
  2. Specify 1 rather than TRUE for the VERIFYPEER option.  1=TRUE and 0=FALSE.  Example: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
  3. Uncomment the line curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);  This is not an ideal solution however because you don’t know who the site is that you are now talking to (could be a spoof site).


Example Use:

curl_setopt($ch, CURLOPT_CAINFO, /path to cabundle);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); // uncomment this line if you get no gateway response. ###


Some useful sites for information are: