php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1511 Huge delay/hang when reading sockets...
Submitted: 1999-06-08 16:19 UTC Modified: 1999-06-18 11:54 UTC
From: danbeck at scott dot net Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0.9 OS: Linux (RedHat 5.2)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: danbeck at scott dot net
New email:
PHP Version: OS:

 

 [1999-06-08 16:19 UTC] danbeck at scott dot net
The following code causes about a 10 to 15 second delay/hang before finishing.  I'm not sure why it takes so long to read from the socket, the server here on our LAN returns a reponse to the initial fwrite() almost instantly...  I have a perl script that uses similar code and it's instantaneous.


$socket = fsockopen($h_addr, $h_port, &$errno, &$errstr);

$cmd = "arbitrary data";
fwrite($socket, $cmd, strlen($cmd));

while (!feof($socket)){
  $buffer .= fread( $socket, 1024);
}

fclose ($socket);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-18 11:54 UTC] sas at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Aug 06 07:01:25 2020 UTC