Edit report at https://bugs.php.net/bug.php?id=55857&edit=1
ID: 55857
Comment by: daltoncaughell at gmail dot com
Reported by: websupport at osite dot de
Summary: ftp_size on large files
Status: Analyzed
Type: Feature/Change Request
Package: FTP related
Operating System: linux
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Stumbled across this issue just thought I would toss in my solution. Just
queries
the ftp server for the size and converts the resulting string to a double
rather
than an int.
$size = 0;
$result = ftp_raw($conn_id, "SIZE " . <file path>);
$parts = explode(" ", $result[0]);
if($parts[0] === "213") {
$size = doubleval($parts[1]);
}
Previous Comments:
------------------------------------------------------------------------
[2011-10-06 08:58:23] [email protected]
It depends on the underlying API used for the network operations, the php's
stream
implementation.
PHP's stream does not support yet LFS and cannot support it easily by only
using
long instead of int (while this breaks the api signature too).
Suspended until we have lfs support.
------------------------------------------------------------------------
[2011-10-06 07:54:34] websupport at osite dot de
Description:
------------
ftp_size does not work on large files > 2gb event not on 64bit systems
can be fixed with the following patch
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55857&edit=1