ID:               30529
 User updated by:  wittj at gmx dot net
 Reported By:      wittj at gmx dot net
 Status:           Bogus
 Bug Type:         FTP related
 Operating System: linux-2.6.8-ck4
 PHP Version:      5.0.2
 New Comment:

Sorry, I did not know that. I mean, I did know that ints on my system
are limited to 32 bits (31 plus sign), but I always thought that php
could handle numbers larger than that. Maybe a silly question: why
does

$number = 4190578688;
print $number."<br/>";
print $number + 10;

work then? With var_dump() I see that $number is treated as a float
value. Why can't ftp_size() just return a float then?
Not being able to recognize files larger than 2GB seems somewhat dated
to me. No offense - I just wonder why this doesn't work. Thank you.


Previous Comments:
------------------------------------------------------------------------

[2004-10-22 12:50:48] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

PHP does not support numbers > 2^31 at this moment.

------------------------------------------------------------------------

[2004-10-22 12:18:37] wittj at gmx dot net

Description:
------------
On my FTP server I have a file which is about 4GB large. The FTP server
(vsftpd) reports the file size correctly (checked with sniffer), however
ftp_size() does only return a size of 2147483647 (2^31) bytes. Obviously
ftp_size() does not support files larger than that, as I get the same
result on other large files.

Reproduce code:
---------------
$conn_id = ftp_connect($server);
$contents = ftp_nlist($conn_id, ".");
foreach($contents as $file) {
  print ftp_size($conn_id, $file);
}

Expected result:
----------------
The correct file size

Actual result:
--------------
A file size of 2^31 bytes.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30529&edit=1

Reply via email to