note 99641 deleted from function.feof by danbrown
| From: | danbrown@php.net | Date: | Fri, 27 Aug 2010 20:45:15 +0000 |
| Subject: | note 99641 deleted from function.feof by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172124@lists.php.net to get a copy of this message | ||
Note Submitter: mugginsoft
----
Note that feof() will return true if the socket times out.
The docs for fsockopen state() that you have to call stream_set_timeout() to set timeouts for
reading and writing but the feof() timeout behaviour seems on by default.
The default feof() timeout is 60 seconds but it can be hard to detect on processes that become
incrementally longer that feof() timing out is an issue.
The default socket time-out can be overridden like so:
<?php
ini_set('default_socket_timeout','1200');
?>
Also note that the timeout used to open the socket is of no relevance here.
Drupal 6 users should note that http_request() uses feof() and is therefore susceptible to timing
out.