2

I am running PHP 7.1 on Windows and seeing a weird behavior. When using cURL to make API calls, everything seems to work for a little bit. After some random interval, the calls start failing with this error.

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

Restarting Apache seems to fix the issue. Then after some random time, it starts showing up again for no obvious reason. Does anyone know what might be going on here?

thebitguru
  • 872
  • 3
  • 12
  • 30
  • Have your tried the answers for this question? https://stackoverflow.com/questions/30240840/laravel-5-socialite-curl-error-77-error-setting-certificate-verify-locations – Ivan Kalita Oct 25 '17 at 16:25
  • "after some random interval" can you fix this? What is different in the environment when it works compared to when it doesn't. Normally, you get this error or you don't get this error, but you don't get it after some time. Are you working on a SAN/NAS? Do you request the same domain up to the point it does not work anymore? – Daniel W. Oct 25 '17 at 16:28
  • @kaduev13 Yes, I saw that question already. Not applicable here. – thebitguru Oct 26 '17 at 00:06
  • @DanFromGermany that's what I would have expected as well; it either works or it doesn't work. When I restart Apache it seems to work, but stops after some time. No SAN/NAS; this is from a Windows VM on Azure. Yes, the requests are to the same domain. I wonder if this is related to DNS somehow. – thebitguru Oct 26 '17 at 00:09
  • The CAfile (cacert.pem) is stored locally, it's not DNS related. I think you should trying to upgrade curl/libcurl and if it doesn't fix, contact the developer of curl. This sounds like a filesystem related curl bug somehow. – Daniel W. Oct 26 '17 at 07:51
  • Old question I know, but I have also encountered this issue on a server without xdebug installed. In a CLI script, I basically have a loop that goes through a large array (about 10000+ values) that contains paths that point to objects stored in Rackspace Cloud Files. Every iteration deletes said file using the rackspace php sdk (which internally uses guzzle). After a certain number of iterations (a couple thousand), all delete requests would fail with a curl error 77. – georaldc Jun 02 '20 at 02:05
  • In case if you haven't already, I would suggest pointing a new question because your situation sounds different than what I was running into. – thebitguru Jun 02 '20 at 13:26

1 Answers1

1

After more troubleshooting, I was able to boil down the issue to the xdebug module. I disabled xdebug and now the SSL connections are working consistently.

thebitguru
  • 872
  • 3
  • 12
  • 30