php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12570 feof () - no break on eof of socket
Submitted: 2001-08-04 20:43 UTC Modified: 2002-06-04 04:35 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: m dot leuffen at i-line dot net Assigned:
Status: Not a bug Package: Network related
PHP Version: 4.0.6 OS: SuSE 7.0
Private report: No CVE-ID: None
 [2001-08-04 20:43 UTC] m dot leuffen at i-line dot net
Hallo,

I have a problem with the fsock-Funktions:


$sock = fsockopen ($ip, $port, &$errno, &$errstr, 30);
while (!feof ($sock)) {
  echo fgetc ($sock);
  flush ()
}
fclose ($sock);


This function hangs after correct output of the initial Data. (It seems that feof () ist false also on end of the $sock)

Or is there an other way to check if the end is reached?

By(t)e,
  Matthias


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-07 12:36 UTC] alindeman@php.net
status -> analyzed (!)
 [2001-08-07 13:20 UTC] alindeman@php.net
reproduced with latest CVS.
 [2002-01-28 09:42 UTC] pdesjardins at kamitech dot com
I have the same bug on RedHat 7.2.
Can I have a workaround for feof()?

Thanks
 [2002-06-04 04:35 UTC] mfischer@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC