Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 10, 2006, 10:21 am
rate this thread
connect to an ssl server. Curl works fine using http, and the
command-line client works with https. But, in php, I just get error 7
when trying to connect through https. So, the problem would seem to be
with php's bundled curl support. I am on WinXP, and everything is
installed through binaries. Here's an example of my code:
$ch = curl_init("https://login.yahoo.com ");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
Here's partial output from curl_version():
[version_number] => 462336
[age] => 2
[features] => 540
[ssl_version_number] => 0
[version] => 7.14.0
[host] => i386-pc-win32
[ssl_version] => OpenSSL/0.9.8a
[libz_version] => 1.2.3
 => ftp
 => gopher
 => telnet
 => dict
 => ldap
 => http
 => file
 => https
 => ftps
I notice that although I have an entry for ssl_version, I just have "0"
for ssl_version_number. Looking at others' outputs on the web, it looks
like most people have a non-zero value there.
As far as I can tell, I have all the pertinent dlls (libssl32,
ssleay32, libeay32) in the right place (all over after all my attempts
to fix this). My apache is not set up for ssl, but since php/curl is
the client, that should be irrelevant.
Many thanks to anyone who knows the solution to this and will share it.