ID: 40633
Updated by: [EMAIL PROTECTED]
Reported By: adam-phpbugs at adam dot gs
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: *BSD (at least)
PHP Version: 5.2.1
New Comment:
What kind of BSD is that and don't you think that negative free space
is a BSD bug?
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 00:55:02] adam-phpbugs at adam dot gs
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 this bug report at http://bugs.php.net/?id=40633&edit=1