Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002120 [Quercus] minor always 10-26-07 22:18 10-29-07 15:05
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.3
Summary 0002120: fwrite() on socket doesn't write data
Description Run "nc -l -p 12345" to listen for a connection on port 12345. Then:

<?php
$fp = fsockopen("localhost", 12345);
for ($i = 0; $i < 10; $i++) {
        fwrite($fp, $i . " ");
        sleep(1);
}
fwrite($fp, "\n");
fclose($fp);

On vanilla PHP, you will see the numbers 0-9 appear, one per second, in the nc output, then a newline. Quercus pauses for 10 seconds and you get no output from nc whatsoever -- the data never gets sent over the socket.

If you fflush() after each fwrite(), then you get the output. Likewise if you fread() (and send some data from the remote side).
Additional Information
Attached Files

- Relationships

- Notes
(0002409)
ferg
10-29-07 15:05

php/4820
 

- Issue History
Date Modified Username Field Change
10-26-07 22:18 koreth New Issue
10-29-07 15:05 ferg Note Added: 0002409
10-29-07 15:05 ferg Assigned To  => ferg
10-29-07 15:05 ferg Status new => closed
10-29-07 15:05 ferg Resolution open => fixed
10-29-07 15:05 ferg Fixed in Version  => 3.1.4


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker