#46062 [Opn->Fbk]: pfsockopen function not working properly

From: Date: Mon, 15 Sep 2008 00:35:30 +0000
Subject: #46062 [Opn->Fbk]: pfsockopen function not working properly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128964@lists.php.net to get a copy of this message
ID: 46062 Updated by: johannes@php.net Reported By: srtm dot india at gmail dot com -Status: Open +Status: Feedback Bug Type: Performance problem Operating System: Winxpsp2 PHP Version: 5.2.6 New Comment: Are you sure you're always hitting the same apache child? Persistent connections are per apache process/thread not globally. Previous Comments: ------------------------------------------------------------------------ [2008-09-12 06:26:12] srtm dot india at gmail dot com 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 this bug report at http://bugs.php.net/?id=46062&edit=1

« previous php.bugs (#128964) next »