I am getting this error : SSL certificate problem: unable to get local issuer certificate when i am tried consuming an API REST. i had also tried on a server with Linux and the same problem is in.
I found on the web the instructions saying i have to download cacert.pem from the official web cacert.pem and then editing the php.ini file:
[curl]
curl.cainfo = “C:wampbinphpphp8.0.26cacert.pem”
[openssl]
openssl.cafile = “C:wampbinphpphp8.0.26cacert.pem”
Now i have the file.pem and this two lines above are currently on my php.ini. as you can see i follow all the instruction but the problem is going on.
I wrote this line
var_dump(openssl_get_cert_locations());
wich return:
array (size=8)
'default_cert_file' => string 'C:Apache24conf/cert.pem' (length=25)
'default_cert_file_env' => string 'SSL_CERT_FILE' (length=13)
'default_cert_dir' => string 'C:Apache24conf/certs' (length=22)
'default_cert_dir_env' => string 'SSL_CERT_DIR' (length=12)
'default_private_dir' => string 'C:Apache24conf/private' (length=24)
'default_default_cert_area' => string 'C:Apache24conf' (length=16)
'ini_cafile' => string 'C:wampbinphpphp8.0.26cacert.pem' (length=36)
'ini_capath' => string 'C:wampbinphpphp8.0.26' (length=26)
Could you tell me if is something wrong here?