0

Hi I am getting this error when running an application on XAMPP on MAC OS Sierra 10.2

Fatal error: Uncaught exception 'Exception' with message 'HTTP Error (60): SSL certificate problem: self signed certificate in certificate chain'

Not sure if anything to do with this openssl.cafile=/Applications/XAMPP/xamppfiles/share/curl/curl-ca-bundle.crt

I have no idea what to do?

Cheers

roshambo
  • 2,624
  • 6
  • 31
  • 54
  • This is not OS specific but rather a curl problem in php. Have a look at this link http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ – Yolo Apr 06 '17 at 01:15
  • 1
    Possible duplicate of [cURL error 60: SSL certificate: unable to get local issuer certificate](http://stackoverflow.com/questions/29822686/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate) – CodeMonkey Apr 06 '17 at 05:16

2 Answers2

0

You're trying to access some resource over https and the remote server is showing an untrusted certificate.

  • It might just mean your installation is outdated, you can follow the instructions on this anwser https://stackoverflow.com/a/41274288/3474436.

  • If you're on a dev environment you could disable these checks with these two settings :

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    

    But do that at your own risk, as it won't prevent any MitM attack. Therefore you may instead add the certificate into the keystore if you're sure you can trust it.

  • If the remote server you're trying to access belongs to you, you should obtain a certificate, for instance https://letsencrypt.org/ provides free trusted certificates.

Community
  • 1
  • 1
taccola
  • 69
  • 1
  • 4
0

Hi Thanks everyone for the input. I ended up reinstalling XAMPP and this solved this cert issue.

roshambo
  • 2,624
  • 6
  • 31
  • 54