cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

PHP CURL SSL Error

From: <courtney_at_zincastle.com>
Date: Tue, 16 Nov 2004 19:08:01 -0500 (EST)

I've been using curl with php to get shipping rates from UPS for some time
now. I've implemented it on several sites using the following code:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $sUPSURL); // set the post-to url
curl_setopt($ch, CURLOPT_HEADER, 0); // Header control
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

curl_setopt($ch, CURLOPT_POST, 1); // tell it to make a POST,
not a GET
curl_setopt($ch, CURLOPT_POSTFIELDS, $sXML); // put the query string here
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$sRtn = curl_exec ($ch);
//echo "\n".curl_errno($ch)."\n".curl_error($ch)."\n";
curl_close($ch); // close the curl session

This has worked fine for several sites in the past, but for some reason
I've begun receiving error code 35 on this new site: SSL
error:00000000:lib(0):func(0):reason(0).

When running in CURLOPT_VERBOSE: I get the following:
* About to connect() to wwwcie.ups.com:443
* Connected to wwwcie.ups.com (153.2.224.65) port 443
* SSL: error:00000000:lib(0):func(0):reason(0)
* Closing connection #0

I understand that there is some issue here with the SSL handshake, I have
dealt with this same exact (copied and pasted) code accross 5 sites now,
and never ran into this.

Any Ideas?

thanks,
Courtney
Received on 2004-11-17