Bug 124582

Summary: fgets erroring on https protocol
Product: Red Hat Enterprise Linux 3 Reporter: Sean <allins>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-21 17:24:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sean 2004-05-27 18:21:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Gecko/20040206 Firefox/0.8

Description of problem:
repeated "fgets(): SSL: fatal protocol error" errors through output
when trying to use fsockopen with ssl enabled websites.

no errors encountered on fedora2 with php 4.3.4


Version-Release number of selected component (if applicable):
php-4.3.2-11.ent

How reproducible:
Always

Steps to Reproduce:
sample code, run against default redhat logo page:
<?
$fp=fsockopen("ssl://127.0.0.1",443,$errno,$errstr,30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out="GET / HTTP/1.1\r\n";
   $out .="Host: 127.0.0.1\r\n";
   $out .="Connection: Close\r\n\r\n";

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

Actual Results:  repeated error messages: " fgets(): SSL: fatal
protocol error in /home/allins/z.php on line 12 " 

Expected Results:  no errors

Additional info:

functionality required for ssl-enabled xml-rpc webservices

Comment 1 Sean 2004-05-27 18:35:54 UTC
link to bug at php web site. apparently affects multiple version of
php across several os and webservers.

http://bugs.php.net/bug.php?id=23220


Comment 2 Robert Scheck 2004-05-28 07:52:28 UTC
It seems to concern all RHEL3 supported architectures...

Comment 3 Joe Orton 2004-05-28 07:59:53 UTC
Thanks for the report.

Comment 4 Joe Orton 2004-06-21 15:52:14 UTC
Test packages are now available which fix this issue:

http://people.redhat.com/jorton/Taroon-php/

The error "SSL: fatal protocol error" is strictly correct, since it
shows that some versions of mod_ssl do not issue the "close_notify"
alert to correctly shut down the SSL connection.  However, this issue
affects many SSL servers, and it's not usually necessary to worry
about it; I've downgraded the warning from an E_WARNING to an E_NOTICE
in the update packages so it doesn't appear by default.

Thanks for the report.

Comment 5 Sean 2004-06-21 17:24:38 UTC
Thank you, no longer getting the SSL error messages, and does not 
seem to cause any other problems in our dev environment.

Comment 6 Jay Turner 2004-09-02 02:37:10 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-272.html