ssl - PHP cURL says https not supported -
i'm making several curl requests page. after 1 post request, error in curl output
* protocol https not supported or disabled in libcurl * closing connection -1
curl doesn't make request. can't figure out how solve error.
the weird thing ssl enabled both cli , fpm. seen here http://cl.ly/image/1l062c2h2m2w
i tried making request http:// instead of https://. didn't change anything. tried making sure server had ssl, , didn't change it.
my curl calls this
$fp2 = fopen('cookies/debug.txt', 'a'); fwrite($fp2, "\n $action"); fwrite($fp2, "\n $url"); fwrite($fp2, "\n ".sizeof($data)); fwrite($fp2, "\n ".json_encode($data)); fwrite($fp2, "\n_________________________________________\n"); $ch = curl_init(); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_returntransfer, 1); if($action == "post") curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_verbose, 1); curl_setopt($ch, curlopt_followlocation, 1); curl_setopt($ch, curlopt_useragent, $agent); curl_setopt($ch, curlopt_ssl_verifypeer, false); curl_setopt($ch, curlopt_ssl_verifyhost, false); curl_setopt($ch, curlopt_postredir, 3); $fp = fopen('cookies/curl.txt', 'a'); curl_setopt($ch, curlopt_stderr, $fp); curl_setopt($ch, curlopt_cookiejar, $this->strcookie); curl_setopt($ch, curlopt_cookiefile, $this->strcookie); if($header) { curl_setopt($ch,curlopt_httpheader,$header); } // set request post field curl. if($action == "post") { if(in_array("content-type:application/x-www-form-urlencoded", $header)) { $data = http_build_query($data); } curl_setopt($ch, curlopt_postfields, $data); } // response server. $res = curl_exec($ch); fwrite($fp, "\n_________________________________________\n"); fwrite($fp, "\n$action $url\n"); return $res;
and full debug of last call is
______________about try___________________________ post https://sellercentral.amazon.com/gp/communication-manager/view-message.html/ref=ag_xx__cmread?ie=utf8&addnfilter0=rs&arrivaldate=1417064517&clcmresponsetimesuboptions=uwd&curpage=1&dateexactend=&dateexactstart=&datefilter=7d&isinbox=1&itemsperpage=20&marketplaceid=atvpdkikx0der&messageid=a3osg68vxpa9bv&msgindex=1&otherpartyid=&pagenum=1&replytoemail=0&searchboxtext=&showfilters=0&sortby=arrivaldate&sortorder=descending×tamp=1417070427&totalmsg=1&view=reader * protocol https not supported or disabled in libcurl * closing connection -1
the "about try", own debugging. 2 ** output curl when try request.
there space in front of "https". error saying " https" not supported.
Comments
Post a Comment