From: adam-phpbugs at adam dot gs Operating system: *BSD (at least) PHP version: 5.2.1 PHP Bug Type: Filesystem function related Bug description: disk_free_space returns a bad result on filesystems with negative free space
Description: ------------ on a filesystem with a negative amount of free space (this can happen on at least FreeBSD) disk_free_space returns unreasonable results. -=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:55]=- [EMAIL PROTECTED] php -r 'print disk_free_space(".")."\n";' 3.77789318629E+22 -=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:57]=- [EMAIL PROTECTED] df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad7 289G 289G -23G 109% /some/path -=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:58]=- [EMAIL PROTECTED] df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad7 302732078 302699550 -24186038 109% /some/ path Reproduce code: --------------- php -r 'print disk_free_space(".")."\n";' Expected result: ---------------- -24186038 Actual result: -------------- 3.77789318629E+22 -- Edit bug report at http://bugs.php.net/?id=40633&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40633&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40633&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40633&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40633&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40633&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40633&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40633&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40633&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40633&r=support Expected behavior: http://bugs.php.net/fix.php?id=40633&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40633&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40633&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40633&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40633&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40633&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40633&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40633&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40633&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40633&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40633&r=mysqlcfg