Needs review
Project:
Media Mover
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Feb 2010 at 18:42 UTC
Updated:
23 Feb 2010 at 18:01 UTC
The php function stat() only works for files less than 2GB on 32 bit PHP systems. For files larger than 2 GB you need to something like:
$mtime = exec ('stat -c %Y '. escapeshellarg ($file->filename));
Since the code in mm_dir is only looking for a last modified timestamp, I don't see a real downside to checking this way to support larger file transfers.
| Comment | File | Size | Author |
|---|---|---|---|
| 32bit-stat.patch | 1.46 KB | matt westgate |
Comments
Comment #1
arthurf commentedWill this successfully replace filesize() as well? Reading the php docs, it seems like they are suggesting: sprintf("%u", filesize($file)).... Any thoughts about which way to go? I'm using filesize quite a bit right now, so I'd like to come up with one approach that I can use for all the different modules.
Comment #2
msonnabaum commented"stat -c %Y" won't work on BSD, maybe Solaris too.
Unfortunately, stat, find, and ls all have different output formatting when it comes to printing mtime between linux and BSD.
Not really sure what to do here.
Comment #3
arthurf commentedI think the options would be to 1) follow drupal implementations, 2) provide a wrapper that is OS aware 3) ignore it and let people who have this issue modify the appropriate files