ID: 13572
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Sockets related
Operating System: Windows 2k/Linux
PHP Version: 4.0.6
New Comment:

You didn't try the example script from the manual.
Please try it. And what 'similar c program' are you
referring to? Are the sources somewhere available to see?


--Jani


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

[2001-10-07 09:26:10] [EMAIL PROTECTED]

i tried now:
  $fp=fsockopen("udp://10.0.0.2", $mudport, $errno,$errstr);

  socket_set_timeout($fp, 3);

  if($fp)
  {
   echo "con: ok<br>";
   fwrite($fp, "$query_string");
   echo fread($fp, 100);
   fclose($fp);
  }

result is, that php still does not receive an answer from the request (php4.0.7rc3 
compiled as cgi for linux)

tcpdump proves, that there was an answer:
15:22:30.654252 10.0.0.1.1062 > 10.0.0.2.4246: udp 39
15:22:30.661213 10.0.0.2.4246 > 10.0.0.1.4246: udp 126



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

[2001-10-06 20:20:45] [EMAIL PROTECTED]

Does the example UDP script on the manual page for fsockopen() work for you? It does 
for me so I doubt this is a bug..

--Jani



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

[2001-10-06 04:31:49] [EMAIL PROTECTED]

i used fsockopen("udp://$host", $port ....)
socket_set_blocking($fp, FALSE)




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

[2001-10-06 04:26:18] [EMAIL PROTECTED]

In 4.0.7 a new socket has been introduced. Did you used it?

- markus

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

[2001-10-06 04:04:24] [EMAIL PROTECTED]

socket's set to non-blocking, opened at port 9999 udp

 $start=time();
 while((time()-$start)<2)
 {
  $res=fread($fp2, 100);
  echo "$res\n";
 }

no answer from udp socket... a similar c program works

btw: in php4.0.7rc3 the problem isn't fixed


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



Edit this bug report at http://bugs.php.net/?id=13572&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to