I facing problem about certificate error when I using curl to request HTTPS domain. I find cause of problem is there is no certificate configuration in PHP. Below is how to solve my problem.
Here is sample of error:
* About to connect() to notify-api.line.me port 443 (#0) * Trying {IP Address}... * connected * Connected to notify-api.line.me ({IP Address}) port 443 (#0) * SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed * Closing connection #0
Step to solve this problem
- Download Certificate Bundle
- Extract and put PEM file to your web server folder or other folder.
- Enable
mod_ssl
in Apache andphp_openssl.dll
inphp.ini
- Add configuration into php.ini
curl.cainfo="C:/wamp/cacert.pem" openssl.cafile="C:/wamp/cacert.pem"
- Restart Apache Service
Comments
Post a Comment