#26454 [Fbk->Opn]: feof and fgets hangs out
| From: | nunoplopes at sapo dot pt | Date: | Sun, 30 Nov 2003 11:15:13 +0000 |
| Subject: | #26454 [Fbk->Opn]: feof and fgets hangs out | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51382@lists.php.net to get a copy of this message | ||
ID: 26454
User updated by: nunoplopes at sapo dot pt
Reported By: nunoplopes at sapo dot pt
-Status: Feedback
+Status: Open
Bug Type: Sockets related
Operating System: Windows XP - Apache
PHP Version: 4CVS-2003-11-30
Assigned To: wez
New Comment:
The connection stays open and waiting.
Previous Comments:
------------------------------------------------------------------------
[2003-11-30 06:10:25] wez@php.net
does it return two lines and close the connection, or return two lines
and wait for you to send more data?
------------------------------------------------------------------------
[2003-11-30 05:47:15] nunoplopes at sapo dot pt
In the manual it says:
"If an error occurs, returns FALSE." (http://php.net/fgets)
The cvs server should only returns two lines. So, if I call fgets a
third time, it times out and I think it should return FALSE.
And feof doesn't work either, so I never know if the server's reponse
has ended or not...
------------------------------------------------------------------------
[2003-11-30 05:35:05] wez@php.net
I don't have intimate knowledge of the cvs pserver protocol... why
should it return false instead of timeout?
------------------------------------------------------------------------
[2003-11-30 05:26:00] nunoplopes at sapo dot pt
The first example I wrote (in reproduce code) is a good example.
I echo fgets 3 times and it times out in the third fgets. Instead of
timing ou, it should return FALSE.
------------------------------------------------------------------------
[2003-11-30 05:22:46] wez@php.net
Please, just a single script, and please explain what happens and why
it is wrong.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/26454
--
Edit this bug report at http://bugs.php.net/?id=26454&edit=1