Welcome Guest, Not a member yet? Register   Sign In
set up rest with https
#5

OK, done. Thanks..
So is use curl_error($ch) to see.
I'm using CI4, so i set cert path in .env : app.CertPath = APPPATH.'Cert/livehost.crt'
and in the code : curl_setopt($ch, CURLOPT_CAINFO, $config->CertPath);
But unfortunately APPPATH not work on .env,
curl error says "error setting certificate verify locations" and show plain APPPATH !!
It should be changed with 'something/application'

So I change on .env : app.CertPath = 'application/Cert/livehost.crt'
and in the code :
curl_setopt($ch, CURLOPT_CAINFO, ROOTPATH.$config->CertPath);
Reply


Messages In This Thread
set up rest with https - by anthos1984 - 08-02-2018, 04:45 AM
RE: set up rest with https - by jreklund - 08-02-2018, 04:57 AM
RE: set up rest with https - by anthos1984 - 08-02-2018, 05:33 AM
RE: set up rest with https - by jreklund - 08-02-2018, 05:53 AM
RE: set up rest with https - by anthos1984 - 08-02-2018, 06:44 AM
RE: set up rest with https - by jreklund - 08-02-2018, 09:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB