ID: 41874 Updated by: paj...@php.net Reported By: ckeefer at us dot nomura dot com -Status: Assigned +Status: Closed Bug Type: Program Execution Operating System: win32 only PHP Version: 5CVS, 6CVS (2008-11-01) Assigned To: pajoye New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Fixed in 5.3+ Previous Comments: ------------------------------------------------------------------------ [2008-10-24 16:13:15] j...@php.net Assigned to the Windows port maintainer. ------------------------------------------------------------------------ [2007-07-19 20:00:23] j...@php.net As I'm not any win32 expert (nor really care about it) I'll deassign this and forget that change, perhaps someone else who know the win32 stuff picks this up. ------------------------------------------------------------------------ [2007-07-18 15:47:23] ckeefer at us dot nomura dot com I don't actually see how this is an improvement as output was only mixed if you don't redirect, which is expected. If I do something like php progname.php > logfile.txt, I would previously redirect STDIN to the logfile as expected and stderr would still come to the console so I could monitor the program's progress. This is the usual behavior in shell programs, etc. This is how cmd line php was working through version 5.21. 5.22 on changed behavior in that from Win32, the STDERR disappears completely. If you can tell me where STDERR went and how to get to it from exec, I will happily do that. I have hundreds (if not thousands) of php scripts that do this. This new behavior breaks all of them. If I do php progname.php 2>&1 > logfile.txt, even if this works, I get mixed STDIN and STDERR output in the logfile.txt. This will force me to either stay at version 5.21 or earlier, or revise every script we have that currently uses the exec function. Again I ask: Did anything change with the compiler or other development tools used to create the Window Binary? Microsoft has been known to modify libraries in undocumented ways. Thanks Chip Keefer ------------------------------------------------------------------------ [2007-07-18 14:55:27] j...@php.net Since this is actually improvement from previous behaviour where the output was mixed, I'm changing this to a FR. I'll look into adding an extra parameter to store STDERR in. In the meantime I suggest you use proc_open() or popen() which give you more control over these.. ------------------------------------------------------------------------ [2007-07-18 13:01:40] ckeefer at us dot nomura dot com >Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Using the same Win32 binary, not a Cygwin binary. To j...@php.net: That is a good suggestion for just getting STDERR output and I use it often on Unix and Linux systems when I need, and don't care if outputs are mixed. I haven't tested if this construct works with W32. Unfortunately, I need STDIN and STDERR separate. I also have a question: Did the version of compiler or libraries used to compile the binary change? MS is notorious for making undocumented changes to their development tools. Thanks, Chip Keefer ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/41874 -- Edit this bug report at http://bugs.php.net/?id=41874&edit=1