ID: 40993 Updated by: [EMAIL PROTECTED] Reported By: judas dot iscariote at gmail dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: linux 64 bit PHP Version: 5CVS-2007-04-04 (CVS) New Comment:
I fixed the leak, but I believe the message is correct: SSL operation failed, but network operation succeeded (i.e. it accepted the connection, but the data is invalid). At least that's how I read it. Previous Comments: ------------------------------------------------------------------------ [2007-04-04 10:23:36] judas dot iscariote at gmail dot com Description: ------------ Weird/contradictory error messages and memory leaks from an openssl enabled stream. Reproduce code: --------------- //example from the manual. <?php $socket = stream_socket_server("tls://0.0.0.0:8000", $errno, $errstr); if (!$socket) { echo "$errstr ($errno)<br />\n"; } else { while ($conn = stream_socket_accept($socket)) { fwrite($conn, 'The local time is ' . date('n/j/Y g:i a') . "\n"); fclose($conn); } fclose($socket); } ?> execute if from CLI and load point your browser to 127.0.0.1:8000 ( in my case, firefox) Expected result: ---------------- 1. No contrictory message stream_socket_accept(): accept failed: **Success** ( oh well,faliure or success ?? :-) ) 2. no memory leak. Actual result: -------------- PHP Warning: stream_socket_accept(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /home/cristian/sock.php on line 8 Warning: stream_socket_accept(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /home/cristian/sock.php on line 8 PHP Warning: stream_socket_accept(): Failed to enable crypto in /home/cristian/sock.php on line 8 Warning: stream_socket_accept(): Failed to enable crypto in /home/cristian/sock.php on line 8 PHP Warning: stream_socket_accept(): accept failed: Success in /home/cristian/sock.php on line 8 Warning: stream_socket_accept(): accept failed: Success in /home/cristian/sock.php on line 8 [Wed Apr 4 06:19:34 2007] Script: 'sock.php' /home/cristian/php5/ext/openssl/xp_ssl.c(157) : Freeing 0x00C2D5C0 (50 bytes), script=sock.php === Total 1 memory leaks detected === ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40993&edit=1