I spent so much time debugging this, most sites don't tell you a very important option to use with CURL and you will only find out this is the problem by running the PHP script from the command line you get the following output that shows the issue (I don't see any way to get this output from Apache itself).
* About to connect() to ip.ip.ip.ip port 25000
* Trying ip.ip.ip.ip... * connected
* Connected to ip.ip.ip.ip (ip.ip.ip.ip) port 25000
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=domain.com/emailAddressfirstname.lastname@example.org
* start date: 2010-10-20 04:23:10 GMT
* expire date: 2011-10-20 04:23:10 GMT
* SSL: certificate subject name 'domain.com' does not match target host name 'ip.ip.ip.ip'
* Closing connection #0
Add the following to your CURL options:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
The VERIFYHOST option is what I was missing.
php, curl, ssl, connecti, debugging, sites, output, apache, ip, successfully, certificate, verify, locations, cafile, usr, certs, ca, bundle, crt, capath, dhe, rsa, aes, sha, server, somestate, somecity, someorganization, ou, someorganizationalunit, cn, domain, emailaddress, gmt, expire, content, text, html, powered, curl_setopt, ch, curlopt_ssl_verifypeer, curlopt_ssl_verifyhost, verifyhost,