From: ejepsen at gmail dot com
Operating system: FreeBSD
PHP version: 4.4.0RC1
PHP Bug Type: Filesystem function related
Bug description: shell_exec return double filesize
Description:
------------
I use shell_exec to retrieve the directory-sizes.
however the filesizes returned are exactly twice the true size.
I believe this may be related to bug #11386
Reproduce code:
---------------
// MBOX_DIR is directory of your mailboxes
echo $du_raw = shell_exec('du -d1 '.MBOX_DIR);
Expected result:
----------------
2 /usr/boxes/jeab690/mbox1
280 /usr/boxes/jeab690/mbox2
32054 /usr/boxes/jeab690/mbox3
Actual result:
--------------
4 /usr/boxes/jeab690/mbox1
560 /usr/boxes/jeab690/mbox2
64108 /usr/boxes/jeab690/mbox3
--
Edit bug report at http://bugs.php.net/?id=33413&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33413&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33413&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33413&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33413&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33413&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33413&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33413&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33413&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33413&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33413&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33413&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33413&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33413&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33413&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33413&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33413&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33413&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33413&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33413&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33413&r=mysqlcfg