#32858 [Com]: Bug #25649 has crept back into PHP - Improper feof() handling under FreeBSD
| From: | oguz_dayanir at hotmail dot com | Date: | Fri, 12 Feb 2010 23:28:57 +0000 |
| Subject: | #32858 [Com]: Bug #25649 has crept back into PHP - Improper feof() handling under FreeBSD | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-147540@lists.php.net to get a copy of this message | ||
ID: 32858
Comment by: oguz_dayanir at hotmail dot com
Reported By: lew at mailduct dot com
Status: No Feedback
Bug Type: Filesystem function related
Operating System: FreeBSD 4.11-REL
PHP Version: 5.0.4, 4.3.10
Assigned To: wez
New Comment:
Could you help me. A good man would prefer to be defeated than to
defeat injustice by evil means. Help me! Help to find sites on the:
Student government loan for bad credit. I found only this - <a
href="http://www.urbanforestrysouth.org/Members/StudentLoan/nova-scotia-student-loan">nova
scotia student loan</a>. Student loan, these programs incarcerated
myrichuncle to look to come its regular grace youth to file the students
of an annually larger story of own options. Student loan, low loans
junior in doting in british columbia should get the other consumer at
the points they are secular in. THX :-(, Regis from Vanuatu.
Previous Comments:
------------------------------------------------------------------------
[2008-02-11 14:05:33] sb1304 at hotmail dot com
Tested on Fedora4
Linux XXXX 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005 i686
i686 i386 GNU/Linux
php 5.2.5 compiled without SSL (--openssl)
Reproduce code:
#!/usr/local/bin/php
<?php
$file = "/tmp/maillog";
$fp = @fopen($file, 'r');
if (!$fp)
die ("Could not open $file");
while (true) {
$r = array($fp);
$n = stream_select($r, $w = null, $e = null, 30);
if ($n) {
echo fgets($fp);
}
}
Still an issue in php5.2.x.
Stephen
------------------------------------------------------------------------
[2005-08-06 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-07-29 01:57:29] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-28 01:46:34] lew at mailduct dot com
Bug is still present in latest snapshot of PHP.
Also... there seems to be at least one other bug report that is related
to this problem. See bug #32979. The problem is
directly related (and caused) by faulty stream_select and
stream_get_meta_data behaviour.
In summary:
1) stream_select does not properly detect the presence of additional
input data after it hits an EOF. Neither does stream_get_meta_data.
They both continue to return EOF even for a stream that has new data
(filestream, in my example).
2) stream_select does not properly honor its timeout parameter. If no
data is available, the call should WAIT for the timeout period to expire
before returning due to an EOF condition. Instead, it always returns
immediately with an EOF, making the timeout parameter pointless.
3) stream_select does not properly emulate the select() system call,
which would wait for a timeout if no more data were available (EOF)...
in case more data did become available.
Please let me know how else I can help. I'd like to get this recurring
problem resolved once and for all.
------------------------------------------------------------------------
[2005-05-27 08:40:27] sniper@php.net
Assigning to Wez since he fixed it last time..
------------------------------------------------------------------------
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/32858
--
Edit this bug report at http://bugs.php.net/?id=32858&edit=1