FAQ
Hi,

I was a bit disappointed to see that filesize, stat et al don't work on
32bits systems, because they are using 32 bits integer.
I've found a patch written by Wes, but unfortunately it didn't worked.

Well, now, I've found this:

http://bugs.php.net/bug.php?id=48886

This is done right, it works for all streams, not just file.
I think it just the best solution now without breaking the ABI with modules.
With this patch you get 52 bits filesize (which is more than enough with a
32 bits system), 52 bits offset, and so on.

With unmodified PHP code, it's working because the type is used as a double
when it overcome the 32 bit limit.
So instead of this ugly fix : "sprintf("%u", $value)" for 2GB up to 4GB, you
have this one "sprintf("%.0f", $value)", which works with file size < 4503TB
on 32 bits machines.

Please advise.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedSep 11, '09 at 3:38p
activeSep 11, '09 at 3:38p
posts1
users1
websitephp.net

1 user in discussion

X Ryl: 1 post

People

Translate

site design / logo © 2022 Grokbase