ID: 41489 Updated by: [EMAIL PROTECTED] Reported By: n dot escuder at intra-links dot com -Status: Open +Status: Closed Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2.2 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-05-24 13:09:30] n dot escuder at intra-links dot com Description: ------------ When creating an socket server in ssl mode stream_select don't work. In PHP 5.2.1 all work fine the bug is in PHP 5.2.2. Reproduce code: --------------- server.php: $options = array( "ssl" => array( "allow_self_signed" => true, "verify_peer" => false, "local_cert" => "/www/conf/ssl/server.pem" ) ); $context = stream_context_create(); stream_context_set_option( $context, $options ); $s = stream_socket_server( "ssl://0.0.0.0:6310", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context ); while ( 1 ) { $read = array( $s ); $wr = null; $ed = null; if ( stream_select( $read, $wr, $ed, 0, 500 ) > 0 ) { echo "ACCEPT\n"; } } client.php: $s = stream_socket_client( "ssl://localhost:6310" ); $s->write("toto\r\n\r\n"); sleep( 1 ); Expected result: ---------------- when running server.php we must go "ACCEPT" onto the screen. Actual result: -------------- nothing ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1