Fork me on GitHub

#1 2011-08-25 19:24:29

chris...
Member
Registered: 2011-08-14
Posts: 11

[FIXED] Files over 2GB dont display correctly

When a file is over 2GB in size the file size becomes the author

Last edited by chris... (2011-08-25 19:25:00)

Offline

#2 2011-08-27 01:44:29

lucaferrario
Administrator
From: near Como, Italy
Registered: 2011-07-15
Posts: 91

Re: [FIXED] Files over 2GB dont display correctly

Wow, that's interesting! big_smile
But is that the only problem you have with files > 2GB? So the file is not corrupted, there is just an error in the properties, right?
Could you please copy and paste the output of the shell command "ls -l /path/to/file" (if it's a Linux server)?
I'll work on that after september the 1st (I'm on vacation right now).

NOTE: Lars, for the moment ignore this, I'll see if I can fix it. wink

Offline

#3 2011-08-27 11:28:13

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 730
Website

Re: [FIXED] Files over 2GB dont display correctly

lucaferrario wrote:

NOTE: Lars, for the moment ignore this, I'll see if I can fix it. wink

Thanks Luca.

Just a hint: On http://php.net/manual/function.filesize.php they're talking about problems with filesize() on 32 bit Linux systems.

Chris, are you using such a system?


Best regards,
Lars Knickrehm

The oneye project.

Offline

#4 2011-08-27 18:41:06

lucaferrario
Administrator
From: near Como, Italy
Registered: 2011-07-15
Posts: 91

Re: [FIXED] Files over 2GB dont display correctly

Hey Chris, could you also please copy and paste the content of the eyeInfo file?

Offline

#5 2011-09-01 23:34:37

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 730
Website

Re: [FIXED] Files over 2GB dont display correctly

I just read some more http://php.net/manual/function.filesize.php and it seems we cannot fix this right now. The only thing we can do is fixing showing the  author. The filesize will be shown as empty.

Fixed in revision 7265 (see http://eyeos.svn.sourceforge.net/viewvc … ision=7265 ).


Best regards,
Lars Knickrehm

The oneye project.

Offline

#6 2011-09-02 00:16:31

lucaferrario
Administrator
From: near Como, Italy
Registered: 2011-07-15
Posts: 91

Re: [FIXED] Files over 2GB dont display correctly

What if, on affected Linux system, we parse instead the output of shell_exec("ls -l /path/to/file"), extracting the size?
Of course, these could not be applied on Windows systems, they would continue to see an empty filesize.
Does it sound like a good idea or like a stupid one? smile

[EDIT]
And this could be the solution for Windows systems (from php.net forum)

$filesystem = new COM('Scripting.FileSystemObject');
$file = $filesystem->GetFile($filename);
$size = $file->Size();

(I have no Windows servers to test it, just guessing it would work, by trusting the guy who wrote it big_smile ).
But maybe I'm making things too complicated for a very low important problem like this and Lars' solution is better...
[/EDIT]

Last edited by lucaferrario (2011-09-02 00:22:11)

Offline

#7 2011-09-02 18:00:00

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 730
Website

Re: [FIXED] Files over 2GB dont display correctly

My "solution" is a fix for the SortableTable in order to show cells with empty strings as empty cells instead of hiding it, so my fix is not directly related to this.

The linux solution won't work on most shared hosters, but of course you can integrate it into the virtual and real file systems, but remember to check if the function respectively class exist...

I'll fix your solution in case, so just commit what you think is right. And about the windows solution: Just commit it and I'll check it using IIS wink .

Okay?


Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB