I am currently having issues with script that uses cURL through an SSL connection.
I receive the following error back from the gateway when posting.
(curl_exec returned FALSE, SSL certificate problem, verify that the CA cert is OK)
I have discussed this with the hosting techs and the cert is fine. It is running on a Win2k3 box with PHP 4.3.2.
The cURL config is :libcurl/7.10.5 OpenSSL/0.9.7b.
Is there something else that would need to be configured or added for proper use of SSL with PHP on Win2k3?
Here is the code(which came from another post here - thanks):
$url = 'https://www.ccprocessing.gateway.url';
$postfields = 'var=foo'; // for more vars, use HTTP GET format (even tho we're POSTing)
// prepare cURL library to do the POST
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1); // yes, do a post
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); // post fields, in HTTP 'GET' format
// use output buffering instead of direct echo to screen...
// (tho I think it's unnecessary with CURLOPT_RETURNTRANSFER turned on)
ob_start();
$return = curl_exec($ch);
ob_end_clean();
if (!$return) echo "(curl_exec returned FALSE, ".curl_error($ch).")<br>";
curl_close($ch);
echo "return is $return";
// note that you'll probably want to use parse_str() to manage $return
Thanks in advance,