Wrong file size with large files
-
jurgen0
- Phoca Member

- Posts: 19
- Joined: 02 Jul 2014, 21:35
Wrong file size with large files
I have large download files on my website >2GB. Phoca Download shows the size of these files as -1673530073 B and -820058793 B. Smaller files are shown as 2.85 MB and 1 MB. Looks like Phoca Download doesn't support GB-files?
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong file size with large files
Hi, which version of Phoca Download you are using?
There should not by any problem with GB?
Jan
There should not by any problem with GB?
Code: Select all
if ($onlyMB) {
$sizes = array('B', 'kB', 'MB');
} else {
$sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
}If you find Phoca extensions useful, please support the project
-
jurgen0
- Phoca Member

- Posts: 19
- Joined: 02 Jul 2014, 21:35
Re: Wrong file size with large files
Phoca Download 3.0.5
Joomla 3.3.1
Joomla 3.3.1
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong file size with large files
Hi, I will take a look at it and will do some tests. Where exactly are such items displayed (in which view), so I can test it.
Thank you, Jan
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
jurgen0
- Phoca Member

- Posts: 19
- Joined: 02 Jul 2014, 21:35
Re: Wrong file size with large files

See screenshot. Real file size: 2.193.196.900
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong file size with large files
Hi, thank you for the screenshot. But not sure which view this is - is this File View in frontend?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
jurgen0
- Phoca Member

- Posts: 19
- Joined: 02 Jul 2014, 21:35
Re: Wrong file size with large files
Yes it is.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong file size with large files
Hi, confirmed, seems like there is some problem with the function of filesize.
I will take a look at it and let you know. Thank you for the info.
Jan
I will take a look at it and let you know. Thank you for the info.
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong file size with large files
Now checking, the problem occurs in php function filesize. I will take a look at it and will try to discover if there is no other way to find the filesize than using the standard function "filesize" for this 
seems like this is a common issue
http://stackoverflow.com/questions/5188 ... 2gb-in-php
Testing the different guides, but get no right value for files which are larger than 2GB

Jan
seems like this is a common issue
http://stackoverflow.com/questions/5188 ... 2gb-in-php
Testing the different guides, but get no right value for files which are larger than 2GB
Jan
If you find Phoca extensions useful, please support the project
-
jurgen0
- Phoca Member

- Posts: 19
- Joined: 02 Jul 2014, 21:35
Re: Wrong file size with large files
So? No sollution?