ID: 23220 Comment by: obercik at poczta dot onet dot pl Reported By: storozhilov at mail dot ru Status: Closed Bug Type: Documentation problem Operating System: * PHP Version: 4CVS New Comment:
PHP Version 5.0.0RC2 Configure Command './configure' '--with-openssl' ... if ( $fp = fopen("https://xxxxxxxx, "r") ) { while ( $row = fgets($fp, 1024) ) { print($row); } fclose($fp); } Warning: fgets() [function.fgets]: SSL: fatal protocol error in xxxxxxxxxxxxxxxxxxx.php on line xx however it GETS the data... Previous Comments: ------------------------------------------------------------------------ [2004-04-30 06:24:55] mike dot davsi at temple dot edu I'm seeing this against an apache server. What version is this fixed in? file_get_contents("https://....."); PHP 4.3.2 (cgi), Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies I have fixed it for now with error_reporting but would like to get a true fix. ------------------------------------------------------------------------ [2004-02-19 11:00:45] [EMAIL PROTECTED] This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. ------------------------------------------------------------------------ [2004-02-18 19:12:00] [EMAIL PROTECTED] Marking as documentation problem. Some (IIS) non-standard compliant servers send data in a way that causes PHP to raise warnings. When working with such servers you should lower your error_reporting level not to include warnings. ------------------------------------------------------------------------ [2004-02-16 20:16:59] scottmacvicar at ntlworld dot com Since this indeed an error but it will happen anytime you make an HTTPS request to IIS i think the error should be changed to E_NOTICE and the error message updated to what it actually does. Patch --- diff -u network.c network.c.patched --- network.c 2004-02-17 01:20:49.000000000 +0000 +++ network.c.patched 2004-02-17 01:22:23.000000000 +0000 @@ -870,8 +870,8 @@ case SSL_ERROR_SYSCALL: if (ERR_peek_error() == 0) { if (nr_bytes == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "SSL: fatal protocol error"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "SSL: EOF occurred in violation of protocol"); stream->eof = 1; retry = 0; } else { ------------------------------------------------------------------------ [2004-02-16 19:58:27] scottmacvicar at ntlworld dot com Found the cause of this now. Its Microsoft's we can do what we want attituide in regards to IIS. An EOF occured but the SSL "close_notify" message hasn't been sent. I'll write a patch and post it tomorrow hopefully. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23220 -- Edit this bug report at http://bugs.php.net/?id=23220&edit=1