php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15647 exec() only executes internal commands
Submitted: 2002-02-20 13:14 UTC Modified: 2002-04-30 06:33 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:1 (33.3%)
From: eyal at zvi dot org Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.1.1 OS: Windows 2000 Server
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: eyal at zvi dot org
New email:
PHP Version: OS:

 

 [2002-02-20 13:14 UTC] eyal at zvi dot org
Using any of the external program execution methods (exec(), passthru(), etc.) only work with commands that are internal to the command interpreter.

For example passthru("dir") or passthru("time /t") work fine, however passthru("ping.exe localhost") or any other executable file - fails.

There is no error displayed, the script just continues execution without any noticeable delay.

One funny thing is that if a bogus command is passed, eg. passthru("blah_blah.exe"), a line is added to the Apache error log saying:

'blah_blah.exe' is not recognized as an internal or external command, operable program or batch file.

My setup is:

Windows 2000 Server, Apache 1.3.17, PHP 4.11 downloaded as binaries, configurations pretty straightforward (safe_mode=Off!).

I'll be glad to provide any further information.

Eyal Zvi.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-30 04:31 UTC] watford at uiuc dot edu
I have the exact same problem.  PHP.EXE does NOT have this problem but SYSTEM() and EXEC() do when run from Apache.  I too have submitted a bug report.
 [2002-04-30 06:33 UTC] sniper@php.net
Check the permissions. #16924 is the same issue.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC