From owner-freebsd-hackers@freebsd.org Fri Mar 18 07:23:10 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56CF7AD4F89 for ; Fri, 18 Mar 2016 07:23:10 +0000 (UTC) (envelope-from by@reorigin.com) Received: from reorigin.com (reorigin.com [199.48.133.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freebsd10-1-64", Issuer "freebsd10-1-64" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 182E61AE6 for ; Fri, 18 Mar 2016 07:23:09 +0000 (UTC) (envelope-from by@reorigin.com) Received: from reorigin.com (localhost [127.0.0.1]) by reorigin.com (8.14.9/8.14.9) with ESMTP id u2I79TK8005578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 18 Mar 2016 03:09:29 -0400 (EDT) (envelope-from by@reorigin.com) Received: (from by@localhost) by reorigin.com (8.14.9/8.14.9/Submit) id u2I79T2i005577 for freebsd-hackers@freebsd.org; Fri, 18 Mar 2016 03:09:29 -0400 (EDT) (envelope-from by) Date: Fri, 18 Mar 2016 03:09:29 -0400 (EDT) From: Yao Bao Message-Id: <201603180709.u2I79T2i005577@reorigin.com> To: freebsd-hackers@freebsd.org Subject: Strange php shell_exec() issue. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 07:23:10 -0000 Hi, I am trying to get disk usage information via php. So I use shell_exec("du -s file/") to get it. 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! I searched the issue via Google, there is someone got the same issue, but seems no resolutions yet. This seems not a php bug, can this be related with nginx? I use php 7.0.4, nginx 1.8.1, FreeBSD 10.1-RELEASE-p31. Is there anyone got any idea about it? Thanks. by