|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12937 exec does not return value if only one char
Submitted: 2001-08-23 22:36 UTC Modified: 2001-08-23 22:49 UTC
From: simap at scruznet dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 4.0.4pl1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: simap at scruznet dot com
New email:
PHP Version: OS:


 [2001-08-23 22:36 UTC] simap at scruznet dot com
exec() does not seem to return a value when the command it 
executes only outputs only one character.

i have an command line ini file editor i am using via exec.

$num1 = exec(escapeshellcmd("iniedit /var/www/html/test.ini 
-s main -k num1 -r"));

if the ini file is set


normal command line output "46"
works fine $num1 = 46, but for 


normal command line output "4"
however $num1 does not contain a value.

i am able to get around this issue by using passthru()
thanks for php! :)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-23 22:49 UTC]
This is fixed. Try a snapshot:
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Sep 30 01:01:24 2023 UTC