ID: 49423
Updated by: jani@php.net
Reported By: david dot schueler at wapkamera dot de
-Status: Open
+Status: Feedback
Bug Type: Streams related
Operating System: Gentoo Linux
PHP Version: 5.2.10
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Works fine for me. fwrite() returns int(13).
Previous Comments:
------------------------------------------------------------------------
[2009-08-31 13:22:55] david dot schueler at wapkamera dot de
Description:
------------
If i execute the script below, it will not send the text "REGISTER"
over UDP. If the text is prepended with any other character or sent to
another port it will be transmitted successful.
Reproduce code:
---------------
<?php
$opts = array('socket' => array("bindto" => "0:5050")); // set
source
port = 5050
$context = stream_context_create($opts);
$socket = stream_socket_client("udp://127.0.0.1:5060", $errno, $error,
30, STREAM_CLIENT_CONNECT, $context);
fwrite($socket,'REGISTER \r\n');
?>
Expected result:
----------------
The text "REGISTER" followed by a line break to be send over UDP to the
given host and port.
Actual result:
--------------
Nothing happens. No packet gets generated, no error or warning is
thrown. fwrite() retuns 0.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49423&edit=1