PHP 4.0 Bug #7542 Updated: socket_set_blocking is not working
| From: | a dot weerman at kub dot nl | Date: | Tue, 31 Oct 2000 13:17:46 +0000 |
| Subject: | PHP 4.0 Bug #7542 Updated: socket_set_blocking is not working | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36527@lists.php.net to get a copy of this message | ||
ID: 7542
User Update by: a.weerman@kub.nl
Status: Open
Bug Type: *Function Specific
Description: socket_set_blocking is not working
above code worked with PHP Version 4.0.0 but not after upgrade to 4.03pl1..
Previous Comments:
---------------------------------------------------------------------------
[2000-10-31 08:07:30] a.weerman@kub.nl
$tek = "&";
$fp = fsockopen(.., .., &$errno, &$errstr, 15);
socket_set_blocking ($fp, 0);
if(!$fp):
//error
else:
fputs($fp,"GET / HTTP/1.0nn");
$counter = 0;
while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
if ($counter < count($HTTP_POST_VARS)-1):
fputs($fp, $key . "=" . $val . $tek);
else:
fputs($fp, $key . "=" . $val);
endif;
$counter += 1;
}
$running = false;
$stop = time() + 15;
while(!feof($fp)&& time()<$stop) {
echo fgets($fp,128);
$running = true;
}
fclose($fp);
if (!$running):
// error
endif;
endif;
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7542