Wrong file size with large files

Phoca Download - download manager
jurgen0
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Jul 2014, 21:35

Wrong file size with large files

Post by jurgen0 »

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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong file size with large files

Post by Jan »

Hi, which version of Phoca Download you are using?

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');
        }
Jan
If you find Phoca extensions useful, please support the project
jurgen0
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Jul 2014, 21:35

Re: Wrong file size with large files

Post by jurgen0 »

Phoca Download 3.0.5
Joomla 3.3.1
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong file size with large files

Post by Jan »

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
If you find Phoca extensions useful, please support the project
jurgen0
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Jul 2014, 21:35

Re: Wrong file size with large files

Post by jurgen0 »

Image

See screenshot. Real file size: 2.193.196.900
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong file size with large files

Post by Jan »

Hi, thank you for the screenshot. But not sure which view this is - is this File View in frontend?

Jan
If you find Phoca extensions useful, please support the project
jurgen0
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Jul 2014, 21:35

Re: Wrong file size with large files

Post by jurgen0 »

Yes it is.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong file size with large files

Post by Jan »

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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong file size with large files

Post by Jan »

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 :idea:

seems like this is a common issue :idea:
http://stackoverflow.com/questions/5188 ... 2gb-in-php

Testing the different guides, but get no right value for files which are larger than 2GB :idea: :-(

Jan
If you find Phoca extensions useful, please support the project
jurgen0
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Jul 2014, 21:35

Re: Wrong file size with large files

Post by jurgen0 »

So? No sollution?
Post Reply