From: srtm dot india at gmail dot com Operating system: Winxpsp2 PHP version: 5.2.6 PHP Bug Type: Performance problem Bug description: pfsockopen function not working properly
Description: ------------ Hi I am using Apache 2.2.8 under Winxpsp2 I tried to use the 'pfsockopen' function. After making the connection, i used 'fwrite' library function to send data to the server more than 50 times. But what happen is after receiving 33 messages, the tcp server doesnot receive any messages from the client connected. ie the php funnction fwrite is not sending no more than 33 messages. I don't know whether this is a limitation or a bug. all the remaining messages are discarded. but the connection is not thrown away. I have given here the code for php, I had tested with c#.net application tcp server. cheers kumar Reproduce code: --------------- <?php $server = "172.20.112.101"; $port = 2055; $errormsg = ''; $errorno = 0; $fp = pfsockopen($server, $port, $errorno, $errormsg, 300); fwrite($fp, "Data from client"); ?> Expected result: ---------------- I should be able to receive all the messages regardless of how many messages i send using the pfsockopen and fwrite funcions. Actual result: -------------- After sending 33 messages, no messages are sent i am requesting the page 50 times from the browser, the same connection is reused for sending messages. -- Edit bug report at http://bugs.php.net/?id=46062&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46062&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46062&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46062&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46062&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46062&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46062&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46062&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46062&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46062&r=support Expected behavior: http://bugs.php.net/fix.php?id=46062&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46062&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46062&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46062&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46062&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46062&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46062&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46062&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46062&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46062&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46062&r=mysqlcfg