Strange php shell_exec() issue.
Matthew D. Fuller
fullermd at over-yonder.net
Fri Mar 18 07:33:23 UTC 2016
On Fri, Mar 18, 2016 at 03:09:29AM -0400 I heard the voice of
Yao Bao, and lo! it spake thus:
>
> I execute the command via shell and php CLI, both return the same
> right result. But the problem is, when I try to echo the result on
> browser, the number field of the output doubled!
Perhaps you've got $BLOCKSIZE=1024 in your env, so when you run it
from your shell (or a descendent thereof), it's showing the output in
multiples of 1k, but from the web there's no such env, so you're
showing in multiples of 512. Try with du -k (or -h, if it's for human
consumption anyway).
--
Matthew Fuller (MF4839) | fullermd at over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
More information about the freebsd-hackers
mailing list