php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34927 WebSphere IBM server HTTPS CURL connection failure
Submitted: 2005-10-20 10:52 UTC Modified: 2005-10-27 21:27 UTC
From: fjsignes at computerxabia dot com Assigned: mike (profile)
Status: Not a bug Package: cURL related
PHP Version: 4.4.0 OS: Windows
Private report: No CVE-ID: None
 [2005-10-20 10:52 UTC] 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




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-20 17:16 UTC] mike@php.net
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-25 17:21 UTC] mike@php.net
Going to be fixed in 4.4.2
 [2005-10-27 21:27 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please make sure that the server is properly configured.

Apache Jakarta suggest to use the following Test class to verify a SSL enabled server is properly configured:
http://dev.iworks.at/PATCHES/Test.java.txt

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC