php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42165 fsockopen ssl Operation now in progress (115)
Submitted: 2007-08-01 11:52 UTC Modified: 2008-07-11 21:42 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: ebalaskas at ebalaskas dot gr Assigned:
Status: Wont fix Package: OpenSSL related
PHP Version: 4.4.7 OS: Linux Ubuntu 7.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
10 + 14 = ?
Subscribe to this entry?

 
 [2007-08-01 11:52 UTC] ebalaskas at ebalaskas dot gr
Description:
------------
Linux Ubuntu 7.04
Apache/2.0.59
Php/4.4.7
Openssl/0.9.8e

All http (tcp 80) are ok,
All ssl (tcp 443) produce the below msg.

The Resource_id is null


Reproduce code:
---------------
<?php
$fp = fsockopen("ssl://www.example.com", 443, $errno, $errstr);

echo "fp: " . $fp ."<br>\n";

if (!$fp) {
   echo "$errstr ($errno)<br>\n";
   echo $fp;
} else {
    $out = "GET / HTTP/1.1\r\n";
    $out .= "Host: ".$host."\r\n";
    $out .= "Connection: Close\r\n\r\n";

    fwrite($fp, $out);
    while (!feof($fp)) {
        echo fgets($fp, 128);
    }
    fclose($fp);
}
?>

Expected result:
----------------
The page of www.example.com

Actual result:
--------------
Warning: fsockopen() [function.fsockopen]: php_stream_sock_ssl_activate_with_method: failed to create an SSL context in /usr/local/apache2/htdocs/test.php on line 6

Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode 1 in /usr/local/apache2/htdocs/test.php on line 6

Operation now in progress (115)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-20 09:36 UTC] ebalaskas at ebalaskas dot gr
isn't there any solution for v4 ?
i know all about for the v4 end of life,
but isn't there somehow a fix for this ?
 [2008-07-11 21:42 UTC] jani@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC