|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18994 exec() with redirection pipes fails.
Submitted: 2002-08-20 16:37 UTC Modified: 2002-10-14 19:35 UTC
From: christian at riiser dot se Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.2.2 OS: Windows 2000 SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-08-20 16:37 UTC] christian at riiser dot se

exec("cmd.exe /c dir",$result,$status)
gives good output to result array.


exec("cmd.exe /c dir>c:\TEMP\test.txt",$result,$status)

fails with access error.

User running website has full access to C:\temp.
----------"------------- read access to cmd.exe.

Loggin on to machine with same user account and opening an cmd windows & running the full cmd.exe /c etc.etc. works...

It looks like an bug, but I might be very wrong. If so, please to hesitate to tell me that... :)



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-26 11:18 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

exec("cmd.exe /c dir > c:\\TEMP\\test.txt",$result,$status)

(Quote your backslashes!)

If that doesn't solve the problem, we need more info
like the actual error message and your ini settings etc. etc.
 [2002-10-14 19:35 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

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