note 99641 added to function.feof

From: Date: Fri, 27 Aug 2010 20:02:57 +0000
Subject: note 99641 added to function.feof
Groups: php.notes 
Request: Send a blank email to php-notes+get-172121@lists.php.net to get a copy of this message
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. ---- Server IP: 92.48.74.199 Probable Submitter: 86.151.165.114 ---- Manual Page -- http://www.php.net/manual/en/function.feof.php Edit -- https://master.php.net/note/edit/99641 Del: integrated -- https://master.php.net/note/delete/99641/integrated Del: useless -- https://master.php.net/note/delete/99641/useless Del: bad code -- https://master.php.net/note/delete/99641/bad+code Del: spam -- https://master.php.net/note/delete/99641/spam Del: non-english -- https://master.php.net/note/delete/99641/non-english Del: in docs -- https://master.php.net/note/delete/99641/in+docs Del: other reasons-- https://master.php.net/note/delete/99641 Reject -- https://master.php.net/note/reject/99641 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172121) next »