ID: 41874
Updated by: tony2001@php.net
Reported By: ckeefer at us dot nomura dot com
-Status: Open
+Status: Feedback
-Bug Type: Output Control
+Bug Type: Unknown/Other Function
Operating System: Windows XP Pro SP2
PHP Version: 5.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2007-07-02 18:39:25] ckeefer at us dot nomura dot com
Description:
------------
PHP CLI version 5.1.8 thru 5.2.1 Windows Binary - exec() function, when
error is generated passes STDERR no problem to CLI window. 5.2.2+
STDERR output has vanished. Nothing in documentation or search suggests
what happened. No other changes 5.2.1 just downloaded and tested with
generic setup (no php.ini or other modifications) stderr from exec()
functions perfectly. 5.2.2+ system() apparently passes stderr properly,
but is not useful for most of what we do. STDOUT appears to be fine all
versions.
Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1
Note in 5.2.2 changelog contains this bit:
- Fixed commandline handling for CLI and CGI. (Marcus, Johannes)
Thanks,
Chip Keefer
Reproduce code:
---------------
<?php
$result = exec('cd c:\non_existant; dir nonexistant');
echo "$result\n";
?>
Expected result:
----------------
NJPC3916:php5.22$ php test_exec.php
php test_exec.php
The system cannot find the path specified.
- Works properly with cygwin
Actual result:
--------------
C:\php5.22>php test_exec.php
C:\php5.22>
No STDERR
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41874&edit=1