PHP 4.0 Bug #5645: filesize is always 1 byte short

From: Date: Mon, 17 Jul 2000 19:14:05 +0000
Subject: PHP 4.0 Bug #5645: filesize is always 1 byte short
Groups: php.dev 
Request: Send a blank email to php-dev+get-24821@lists.php.net to get a copy of this message
From: jandeluyck@gmx.net Operating system: FreeBSD / Win32 PHP version: 4.0.1pl2 PHP Bug Type: Misbehaving function Bug description: filesize is always 1 byte short when calling the following: $str_of_file = "blah.txt"; // file is 500bytes $file = fopen($str_of_file); fgets($file,filesize($str_of_file)); // i only get the 499 first characters of the file! So there seems to be a problem. Tested on Win32 (WinNT 4 / 2000) platforms as on FreeBSD 3.0-RELEASE. the Win32 binary was the one supplied on the PHP site, running on an Apache 1.3.12.

« previous php.dev (#24821) next »