#34927 [NEW]: WebSphere IBM server HTTPS CURL connection failure

From: Date: Thu, 20 Oct 2005 08:52:12 +0000
Subject: #34927 [NEW]: WebSphere IBM server HTTPS CURL connection failure
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86793@lists.php.net to get a copy of this message
From:             fjsignes at computerxabia dot com
Operating system: Windows
PHP version:      4.4.0
PHP Bug Type:     cURL related
Bug description:  WebSphere IBM server HTTPS CURL connection failure

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 bug report at http://bugs.php.net/?id=34927&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34927&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34927&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34927&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34927&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34927&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34927&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34927&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34927&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34927&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34927&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=34927&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=34927&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34927&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34927&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34927&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34927&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34927&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34927&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34927&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34927&r=mysqlcfg


Thread (5 messages)

« previous php.bugs (#86793) next »