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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 + 22 = ?
Subscribe to this entry?

 
 [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: Fri Apr 26 07:01:32 2024 UTC