php.net |  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
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: christian at riiser dot se
New email:
PHP Version: OS:

 

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

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

running

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... :)

/Christian

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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.


Try
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] sniper@php.net
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: Tue Mar 19 11:01:28 2024 UTC