Question

Running WAMP 2.2

PHP 5.4.3 JQuery 2.10

Curl Request in Prod gives Status 200 and JSON response

Curl Request in WAMP gives Status 0 and boolean false as a response.

It's the same exact code. Help?!

curl enabled in php.ini

php.ini info:

cURL support    enabled
cURL Information    7.25.0
Was it helpful?

Solution

Figured out the error I was getting was: SSL certificate problem, verify that the CA cert is OK.

But I'm not getting it on my Linux server, is there a way to ignore those in the ini level instead of adding the following?

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);

UPDATE:

Fixed it by adding the following to my php.ini file

curl.cainfo = "C:/wamp/cert/cacert.pem"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top