From:             david at triax dot jp
Operating system: RedHat Enterprise ES 4
PHP version:      5.2.0
PHP Bug Type:     Filesystem function related
Bug description:  disk_free_space assumes a blocksize of 4096

Description:
------------
Using disk_free_space() on an NFS mount produced incorrect results so
checking with strace, it seems PHP is ignoring the value of f_bsize and
either using f_frsize or just using a fixed blocksize of 4096. I haven't
checked the source code yet. Calling stat() on the same path shows the
correct blocksize for the filesystem, in my case 32768, and so dividing
the output of disk_free_space() by 4096 and multiplying by the result of
stat()'s blksize element.


Expected result:
----------------
I expected the value of disk_free_space() to use the same block size as
reproted by stat() on the same path.

Actual result:
--------------
disk_free_space() seems to use a fixed 4096 byte block size.

-- 
Edit bug report at http://bugs.php.net/?id=39520&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39520&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39520&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39520&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39520&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39520&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39520&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39520&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39520&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39520&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39520&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39520&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39520&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39520&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39520&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39520&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39520&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39520&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39520&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39520&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39520&r=mysqlcfg

Reply via email to