ID:               23220
 Updated by:       [EMAIL PROTECTED]
 Reported By:      storozhilov at mail dot ru
-Status:           Assigned
+Status:           Analyzed
-Bug Type:         Filesystem function related
+Bug Type:         Documentation problem
 Operating System: *
 PHP Version:      4CVS
 Assigned To:      wez
 New Comment:

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. 


Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2004-02-16 17:00:49] aaron_hawryluk at shaw dot ca

This also seems to cause a problem with file_get_contents which I am
using to retrieve transaction data.  Test case is:

<code><?php

file_get_contents("https://any.secure.server";);

?></code>

returns:

<code>Warning: file_get_contents(): SSL: fatal protocol error in
/usr/local/www/data-dist/navdev/test.php on line 2</code>



...plus whatever data the secure server provides.

------------------------------------------------------------------------

[2004-02-04 18:48:37] douga at accessdata dot com

I am seeing the same error. It appears to be generated after the
following loop has completed. More specifically, the Warning message is
emitted just after the loop terminates.



while( !feof($handle) )

{

   echo "Looping to read in all of the reply.<br>";

   $reply .= fgets($handle);

}



PHP 4.3.4 compiled with --with-openssl



What other information would be helpful?

------------------------------------------------------------------------

[2004-01-27 12:58:26] admin at jazzfanz dot com

I'm sorry but I can't really tell based on this thread if there was
ever a version of PHP where this problem was corrected.  Is there a
version?



I'm on 4.3.3 currently under IPlanet.



Is there a workaround without using cURL?

------------------------------------------------------------------------

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

Reply via email to