|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20014 SSL w/ fsockopen not working
Submitted: 2002-10-21 15:17 UTC Modified: 2003-03-21 15:49 UTC
Avg. Score:4.4 ± 1.0
Reproduced:21 of 21 (100.0%)
Same Version:9 (42.9%)
Same OS:11 (52.4%)
From: dietrich dot ayala at foundstone dot com Assigned: edink (profile)
Status: Wont fix Package: Sockets related
PHP Version: 4CVS-2003-02-05 OS: windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-10-21 15:17 UTC] dietrich dot ayala at foundstone dot com
Environment: W2K/IIS5/php 4.3.0-dev (win32 snapshot 10/21, 7:25), CGI

Reproduce w/:

$fp = fsockopen('ssl://',$port);


"Warning: fsockopen() [function.fsockopen]: no SSL support in this build in E:\test\fsockopen_ssl.php"

phpinfo() shows OpenSSL is available. I tested the openssl funcs to confirm availability. All DLLs are copied to system32 dir.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-21 15:24 UTC]
Looks like main/ needs to

I'm unable to test this ATM, so I'm hoping that some other kind win32 developer can look into it.
 [2003-02-05 01:07 UTC]
This is reproducable with latest php4-win32 snap, latest php4 source snap works on Linux:

Relevant parts from phpinfo():
Registered PHP Streams => php, http, ftp, compress.zlib
OpenSSL support => enabled
OpenSSL Version => OpenSSL 0.9.6g 9 Aug 2002

Bug #20014 SSL w/ fsockopen not working
var_dump(fsockopen('ssl://', 443));
resource(4) of type (stream)

resource(4) of type (stream)
Warning: fsockopen() [/phpmanual/function.fsockopen.html]: no SSL support in this build in D:\work\php4\ext\openssl\tests\bug20014.php on line 2

Warning: fsockopen() [/phpmanual/function.fsockopen.html]: unable to connect to in D:\work\php4\ext\openssl\tests\bug20014.php on line 2
 [2003-02-05 16:14 UTC]
The 'OpenSSL support => enabled' is a bit misleading
since it just means that the openssl _extension_ is available. But the main PHP is not linked with the ssl
libs (win32 binaries provided by so of course
the SSL support is not available...Edin is looking into
this so assigning to him.

 [2003-02-13 09:43 UTC] m dot fedor at espritsro dot sk
I changed main/config.w32.h and #define HAVE_OPENSSL_EXT 1 was added there (suggestion from I compiled latest PHP sources under Win2000 using Visual Studio 6.0 , CygWin, OpenSSL libraries, .... Unfortunately there is still bug with fsockopen() function: no SSL support in this build. Are there any other suggestion to solve this problem?
 [2003-03-04 07:41 UTC]
A new infrastructure for dealing with this issue is being implemented in php5. It will therefore not be fixed by bundling openssl in the php4 build. Could even be illegal in some countries.
 [2003-03-04 11:44 UTC] dietrich dot ayala at foundstone dot com
so no fix at all for 4.3.x? 

ouch, that leaves a bunch of us in the cold for probably more than a year.

any pointers on solving this manually? posted a custom dll here:

but he hasn't answered my emails regarding how i would do this myself, or if he's going to update for further 4.3.x releases :(

any info would be helpful, thanks!
 [2003-03-04 17:03 UTC]
It was me who built that binary. I'll try to keep that site updated with the new versions of 4.3.x branch. I will also write instructions on how you can do this yourself and post it on that url.
 [2003-03-04 17:05 UTC] dietrich dot ayala at foundstone dot com
excellent, thank you!
 [2003-03-21 15:49 UTC] dietrich dot ayala at foundstone dot com
hi edin,

any estimates on when you can post a new php4ts.dll and/or instructions on how i need to build this in myself?

as i said in my email: i'll be glad to put a donation in your box, or grab something on your amazon wishlist if you have one :)


PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 21:01:28 2023 UTC