Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Bug #3100 ssl:// is causing Net_Socket::connect() to fail
Submitted: 2005-01-04 23:48 UTC
From: joe at joestump dot net Assigned: chagenbu
Status: Closed Package: Net_Socket
PHP Version: Irrelevant OS: Linux/All
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 - 34 = ?

 
 [2005-01-04 23:48 UTC] joe at joestump dot net
Description: ------------ 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 hostname. 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).

Comments

 [2005-01-05 10:54 UTC] 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://<host>' not being resolvable.
 [2005-01-05 11:10 UTC] 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 sees. 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 broken.
 [2005-01-11 21:59 UTC] 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 pear.php.net. In case this was a pear.php.net 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.
 [2018-02-15 19:16 UTC] nilnirob (Nil Nirob)
I fixed this problem on http://evergreenquotes.com