I recently started randomly seeing the following error in a development environment for a PHP application that I am maintaining.

cURL error 77: error setting certificate verify locations: CAfile: c:\<<Path removed>>\cacert.pem CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

What was weird was that the CA file existed at the path that was shown in the error.  Restarting Apache seemed to fix the issue for a little bit, but then the issue would come back.

After troubleshooting more, I finally decided to start backing out some recent changes to see if any of those were causing this unrelated, random issue.  It took a few backouts before I found the culprit.

In our case, it was xdebug that was causing this issue.  I had enabled xdebug for some performance testing recently.  I would not have guessed that xdebug would have caused random issues with SSL connections and only SSL connections!

Back to blog...