php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20313 fsockopen fails with ssl://
Submitted: 2002-11-08 10:49 UTC Modified: 2002-11-08 12:02 UTC
From: chris dot baxter at ic24 dot net Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 4.2.3 OS: Linux Redhat 2.4.2-2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chris dot baxter at ic24 dot net
New email:
PHP Version: OS:

 

 [2002-11-08 10:49 UTC] chris dot baxter at ic24 dot net
Apache 1.3.27, OpenSSL 0.9.6b 

When adding ssl:// to my fsockopen routine it fails to open a connection but gives no reason for failure. If I remove ssl:// from the command it work fine and the server disconnects for failing to establish an ssl connection as I would expect.

<?php
// This opens a standard socket connection
//$fp = fsockopen("mywebsite.com", 4437, $errno, $errstr);

// This doesn't open a socket or give a reason for failure
$fp = fsockopen("ssl://mywebsite.com", 4437, $errno, $errstr);
if (!$fp) {
    echo "ERROR: $errno - $errstr<br>\n";
} else {
	echo "OK<br>\n";
    fwrite($fp,"my data is here\n");
    echo fread($fp, 26);
    fclose($fp);
}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-08 10:58 UTC] sander@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-11-08 12:02 UTC] sniper@php.net
The support for SSL in fsockopen() is only available in 4.3.0-dev at the moment..4.2.3 does not have it.

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 29 15:01:24 2020 UTC