From:             andrej at antiszoc dot hu
Operating system: FreeBSD
PHP version:      4.3.5
PHP Bug Type:     Program Execution
Bug description:  exec(du) returns width doubled values

Description:
------------
We are using a script, which looks up every directory of our webhosting
customers. For some reasons we don't use quota, just looks the space, the
customers use. The script executes du, width exec('du -d 0 -h
/MAINDIR'.dirname); this worked just fine, for weeks. Last week we
update-ed to PHP4.3.5 and after, the script emailed us very wierd numbers.
Taking a closer look we saw, that with exec() du returns exactly the twice
of the real du value, but everything else fine. We tested it from directly
in the shell, and of coz several times, in our PHP script.



This a very simple thing, so wouldn't post any code samples.



P.S: I've just tried stat, it worked far more worse...



Thx,

Andrej


-- 
Edit bug report at http://bugs.php.net/?id=27867&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27867&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27867&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27867&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27867&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27867&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27867&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27867&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27867&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27867&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27867&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27867&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27867&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27867&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27867&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27867&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27867&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27867&r=float

Reply via email to