From: ("")
Date:  16 Feb 2018 03:16:14 Hong Kong Time

[PEAR-BUG] Bug #3100 [Com]: ssl:// is causing Net_Socket::connect() to fail

NNTP-Posting-Host:  null

Edit report at

 ID:               3100
 Comment by:       nilnirob19 at gmail dot com
 Reported By:      joe at joestump dot net
 Summary:          ssl:// is causing Net_Socket::connect() to fail
 Status:           Closed
 Type:             Bug
 Package:          Net_Socket
 Operating System: Linux/All
 PHP Version:      Irrelevant
 Assigned To:      chagenbu
 Roadmap Versions: 
 New Comment:

I fixed this problem on

Previous Comments:

[2005-01-11 16:59:09] chagenbu

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.


[2005-01-05 06:10:52] avb

That's not a bug in HTTP_Request, connecting to SSL-enabled port without
ssl:// will NOT work, hence the malformed response the original reporter

Net_Socket should be fixed to remove the ssl:// prefix before using
gethostbyname() and add the prefix back after that. Or add some other
means for specifying SSL connection. Current behaviour is definitely


[2005-01-05 05:54:23] pookey

I confirm. 
Line 107 in Socket.php 
            $this->addr = gethostbyname($addr); 
            if (strcmp($this->addr, $addr) == 0) { 
                return $this->raiseError("unable to lookup 
hostname '$addr'"); 
This obviously fails due to 'ssl://' not being 


[2005-01-04 18:48:42] joe at joestump dot net

There is code in sendRequest() that adds 'ssl://' to the 
$host, which is then passed to Net_Socket::connect() as 
the $addr. The ssl:// is causing something to barf 
because I keep getting an error that it couldn't look up 

Moving the $host = 'ssl://'.$host below the connection 
call seemed to fix the issue (though it doesn't fix the 
problem that I'm getting a malformed response, but 
that's not an HTTP_Request issue).


Edit this bug report at