How to solve cURL error 60: ssl certificate problem
In this tutorial I will show you, how to solve cURL Error 60: SSL certificate problem.
Notice: That error was met me when I tried to install new symfony project. Your scenario may be different from my case. But, you can follow bellow steps to solve the error.
As an example, when you are creating new symfony project using command line interface, sometimes you can see the error, cURL error 60.
Why does this error happen? This error happens because peer certificate cannot be authenticated with known CA certificates.
How to solve that problem?
To solve that error, we have to provide cURL certificate authority information and define CURL certificate authority information path. How to do it?
Notice: Here I’m using xampp as my webserver. Your webserver may be wamp, mamp or any php relevant webserver.
Click here to download the cURL certificate authority information file. Then, move that file into xampp\php\extras\ssl folder. After that go back to the php folder and open php.ini file. Search for ‘curl.cainfo’.
Then, copy ‘curl.cainfo’ file path (C:\xampp\php\extras\ssl\cacert.pem.txt) into php.ini file to value of curl.cainfo. Remove semicolon to uncomment the line and save changes after coping the file path.
After doing these things, the php.ini file is as follows.
Notice: Make sure that you,
Insert .txt extension at end of the file path.
Save all changes.
Find the right location to set path.
Finally, navigate to your projects folder and open new command line interface. Try to install new symfony project again.
If you got the same error or another error after doing above things, try the followings.
- Restart webserver.
- Remove .txt extension and save changes. Then, restart webserver.
As you can see, now we have solved the problem.
If you have any question, please comment in the comment section. If you like this article don’t forget to share. Thank you for reading.