PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Request » Bug #7643

SSL Requests Fail

Details

Submitted2006-05-16 20:36 UTC
Frombfears at msu dot edu
StatusNo Feedback
PackageHTTP_Request
PHP Version4.4.2
OSWindows Server 2003
Roadmaps(Not assigned)

Comments

[2006-05-16 20:36 UTC] bfears at msu dot edu

Description:
------------
I'm using the binary version of PHP 4.4.2 for Windows, doing a simple query of any SSL-based web server. Non-SSL web servers return pages properly.

I have tested this in PHP 5.1.4, and it works fine.

Test script:
---------------
<?php

error_reporting( E_ALL );
ini_set("display_errors", 1);

include('HTTP/Request.php');
$req = &new HTTP_Request( "https://www.domain.com:443" );
$result = $req->sendRequest();
if( PEAR::isError( $result ) )
{
print( "ERROR: HTTP_Retrieve FAILED\n" );
print_r( $result );

}

$response = $req->getResponseBody();

echo $response;

print( "Response Code=" );
echo $req->getResponseCode();

?>

Expected result:
----------------
The pre-defined page should have been displayed when this script was run.

Actual result:
--------------
ERROR: HTTP_Retrieve FAILED
pear_error Object
(
[error_message_prefix] =>
[mode] => 1
[level] => 1024
[code] => 0
[message] => The operation completed successfully.

[userinfo] =>
[backtrace] => Array
(
[0] => Array
(
[file] => c:\bin\php\pear\PEAR.php
[line] => 543
[function] => pear_error
[class] => pear_error
[type] => ->
[args] => Array
(
[0] => The operation completed successfully.

[1] => 0
[2] => 1
[3] => 1024
[4] =>
)

)

[1] => Array
(
[file] => c:\bin\php\pear\Net\Socket.php
[line] => 143
[function] => raiseerror
[class] => net_socket
[type] => ->
[args] => Array
(
[0] => The operation completed successfully.

[1] => 0
)

)

[2] => Array
(
[file] => c:\bin\php\pear\HTTP\Request.php
[line] => 619
[function] => connect
[class] => net_socket
[type] => ->
[args] => Array
(
[0] => ssl://www.domain.com
[1] => 443
[2] =>
[3] =>
[4] =>
)

)

[3] => Array
(
[file] => c:\inetpub\wwwroot\example.php
[line] => 8
[function] => sendrequest
[class] => http_request
[type] => ->
[args] => Array
(
)

)

)

[callback] =>
)
Response Code=

[2006-06-05 15:42 UTC] chagenbu at php dot net

And Net_Socket just returns the error from fsockopen, so by your logic this is a bug in PHP. Something is off in the connection parameters.

[2006-06-05 17:11 UTC] bfears at msu dot edu

So do you see anything wrong with my logic? I'd hate to waste everyone's time if something is wrong with my code.