From: dustin at virtualroadside dot com
Operating system: Gentoo Linux
PHP version: 5.2.3
PHP Bug Type: Streams related
Bug description: gzgets returns false when reading an uncompressed file
Description:
------------
gzgets returns false at the end of file when reading an uncompressed file.
It does not return false when reading compressed files.
Installed:
zlib 1.2.3-r1 (gentoo)
If this is intended behavior, then the documentation should probably have
it in there.. unless I missed it. :)
Reproduce code:
---------------
$f = gzopen('somefile','r');
while(!gzeof($f))
if (($line = gzgets($f,65535)) === false)
echo "It returned false.\n";
else
echo "It did not return false!\n";
Expected result:
----------------
It did not return false!
...
It did not return false!
Actual result:
--------------
It did not return false!
...
It did not return false!
It returned false.
--
Edit bug report at http://bugs.php.net/?id=42014&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42014&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42014&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42014&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42014&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42014&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42014&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42014&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42014&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42014&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42014&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42014&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42014&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42014&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42014&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42014&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42014&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42014&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42014&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42014&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42014&r=mysqlcfg