|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-08-20 09:17 UTC] tony2001@php.net
  [2007-08-20 09:36 UTC] ebalaskas at ebalaskas dot gr
  [2008-07-11 21:42 UTC] jani@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 09:00:01 2025 UTC | 
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)