php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41643 ftp_size() does not return work on large files
Submitted: 2007-06-09 18:48 UTC Modified: 2011-02-21 21:03 UTC
Votes:5
Avg. Score:4.0 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: mweber at netprovide dot com Assigned:
Status: Open Package: FTP related
PHP Version: 5.2.3 OS: SuSE Linux 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mweber at netprovide dot com
New email:
PHP Version: OS:

 

 [2007-06-09 18:48 UTC] mweber at netprovide dot com
Description:
------------
ftp_size() does not work on files lager than 2GB...

I know, that PHP is limited to handle just 32bit integer values...

My Idea would be, that you alter this function to:

float ftp_size ( resource $ftp_stream, string $remote_file [, int $unit='B'])

where $unit can be:
  GB
  MB
  KB
  B

you just need to change the return value to float and calculate the internal "string"(size) to the value requested...

this would produce smaller numbers...

Reproduce code:
---------------
 

Expected result:
----------------
 

Actual result:
--------------
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-09 18:53 UTC] mweber2 at netprovide dot com
well it should be a string instead of int for the additional argument

float ftp_size ( resource $ftp_stream, string $remote_file [, string
$unit='B'])
 [2011-02-21 21:03 UTC] jani@php.net
-Package: Feature/Change Request +Package: FTP related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 07:01:34 2019 UTC