|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-20 17:16 UTC] mike@php.net
[2005-10-25 17:21 UTC] mike@php.net
[2005-10-27 21:27 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 16:00:01 2025 UTC |
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