ID: 34927
Updated by: [EMAIL PROTECTED]
Reported By: fjsignes at computerxabia dot com
-Status: Open
+Status: Analyzed
Bug Type: cURL related
Operating System: Windows
PHP Version: 4.4.0
-Assigned To:
+Assigned To: mike
New Comment:
Going to be fixed in 4.4.2
Previous Comments:
------------------------------------------------------------------------
[2005-10-20 17:16:06] [EMAIL PROTECTED]
Probably related to bug #33760
I reproduced with 5.1-CVS, and had no problems with pecl/http which has
implemented the SSL crypto lock callbacks.
------------------------------------------------------------------------
[2005-10-20 10:52:10] fjsignes at computerxabia dot com
Description:
------------
When i try the following by command line:
curl.exe -k https://websphereserver:9084/SOAP
(command line curl version:
curl 7.14.0 (i586-pc-mingw32msvc) libcurl/7.14.0
OpenSSL/0.9.8 zlib/1.2.2
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: Largefile NTLM SSL SSPI libz)
I can connect to the server.
In a PHP script executing then comand "exec" like this:
<?php
....
$curl = "path_to_curl\curl.exe";
$_url="https://websphereserver:9084/SOAP";
$data="something";
exec("$curl -k --verbose -d \"$data\" $_url", $result);
print_r($result);
?>
I can connect to the server too.
But when i try to use libcurl library as in the reproduce code
section, i can't establish the connection.
PHP versions ckecked:
-- PHP-5.0.5Win32 with libcurl/7.14.0 OpenSSL/0.9.8 zlib/1.2.3- or
-- PHP-4.4.0Win32 with libcurl/7.11.2 OpenSSL/0.9.8 zlib/1.1.4 -
or
-- PHP-5.1.0RC1-Win32 with libcurl/7.14.0 OpenSSL/0.9.8
zlib/1.2.3-
-- php4-win32-STABLE-200510200430 with libcurl/7.14.0
OpenSSL/0.9.8 zlib/1.2.3
In all of them shows me the same error.
(I just verified that i am using the DLLs shipped with the PHP-xxxx
in each case with Filemon Software)
Reproduce code:
---------------
$_url = 'https://websphereserver:9084/SOAP';
$ch = curl_init();
curl_setopt($ch,CURLOPT_SSLVERSION,3);
curl_setopt($ch, CURLOPT_URL,$_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_USERAGENT,
$defined_vars['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
$cErr = curl_error($ch);
if ($cErr != '') {
$err = 'cURL ERROR: '.curl_errno($ch).': '.$cErr.'<br>';
foreach(curl_getinfo($ch) as $k => $v){
$err .= "$k: $v<br>";
}
echo("Error $err");
curl_close($ch);
return false;
}
curl_close ($ch);
echo("Output: ".$result);
Expected result:
----------------
Establish connection with the server as in the command line:
curl.exe -k https://websphereserver:9084/SOAP or
curl.exe -3 -k https://websphereserver:9084/SOAP
Actual result:
--------------
Without forcing any SSLVersion:
(without writing: curl_setopt($ch,CURLOPT_SSLVERSION,3);
in the php code)
Error cURL ERROR: 35: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol
Forcing SSLv3:
Error cURL ERROR: 35: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
version number
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34927&edit=1