PHP timeout doing fread from Apache Coyote

From: Date: Thu, 24 Jul 2003 13:59:00 +0000
Subject: PHP timeout doing fread from Apache Coyote
Groups: php.general 
Request: Send a blank email to php-general+get-156640@lists.php.net to get a copy of this message
I am trying to communicate with an API of a vendors of ours. They provide a Perl example that works fast and well. I am trying to do the same thing with a PHP class. The response takes over a minute before the response comes back. I see from the response text that the API is running on Apache Coyote/1.0. Does anyone know of issues with this match-up, here is the snippet of code that seems to be hanging. Using my Komodo debugger, it points to the line with 'while($data=fread($fp, 32768))' while waiting for execution to continue. Using a Perl script provided by them, I get a response in seconds. Basically, my PHP page prepares content and variables and then uses this class to send XML formatted content to receive a response. ... $fp=fsockopen($this->server, $this->port, &$this->errno, &$this->errstr, $this->timeout); if(!$fp) { $this->errstr="Cant Connect to Service ($this->server:$this->port, $this->errno, $this->errstr)"; return; } if (!fputs($fp, $op, strlen($op))) { $this->errstr="Write error"; return; } else { $ipd = ""; while($data=fread($fp, 32768)) { $ipd.=$data; } $this->responsetext = $ipd; //echo "<p>".$ipd."</p>"; $ipd = $this->_parse_header($ipd); } fclose($fp); return $ipd; ...

« previous php.general (#156640) next »