Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesizes reporting as negative amounts #2

Open
CodyWarmbo-zz opened this issue Mar 8, 2017 · 9 comments
Open

Filesizes reporting as negative amounts #2

CodyWarmbo-zz opened this issue Mar 8, 2017 · 9 comments

Comments

@CodyWarmbo-zz
Copy link

Currently any file over 2GB in size displays as a negative number. Looking into it myself I believe this is an issue with PHP itself but I think you'd know better than me! I've attached an image of the issue.
capture

@lorenzos
Copy link
Owner

lorenzos commented Jun 14, 2017

Unfortunately this is a PHP issue with filesize() returning 32-bit integers, and there's no easy workaround. /cc @urack

I'll look into @jkuchar's BigFileTools, but I don't think I'll add a whole composer dependency just for that. Maybe I can borrow some of the code and make something smaller into my script.

PRs are welcome, obviously.

@jkuchar
Copy link

jkuchar commented Jun 16, 2017

BigFileTools support only getting filesize. If you want to get filesize in a cross-platform manner, I recommend including BigFileTools as a dependency as different platforms behave differently (that is why BFT has drivers)

(Version 1 is more lightweight - https://github.com/jkuchar/BigFileTools/tree/1.1.3)

@lorenzos
Copy link
Owner

@jkuchar Thank you very much. Version 1 looks like all I need, and the fact that is all in one file makes it a good candidate.

@NaruZosa
Copy link

Any progress with this issue?

@jkuchar
Copy link

jkuchar commented Feb 26, 2018

You can still install this onto 64-bit machine and 64-bit php and you get it working now. ;-)

@lorenzos
Copy link
Owner

Sorry, I didn't have time to work on it. The idea was to use BFT version 1, so... PRs are welcome.

@codywarmbo
Copy link

I'm still very interested in a solution to this...

@jkuchar
Copy link

jkuchar commented Apr 10, 2019

Simple - use 64-bit PHP. ;)

@codywarmbo
Copy link

Unfortunately that does not resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants