Edit report at https://bugs.php.net/bug.php?id=60181&edit=1

 ID:                 60181
 Updated by:         [email protected]
 Reported by:        php at aldomx dot com
 Summary:            proc_open fails to read quoted whitespaced
                     directories in Windows
 Status:             Assigned
 Type:               Bug
 Package:            Program Execution
 Operating System:   Windows 7
 PHP Version:        5.3.8
 Assigned To:        mattficken
 Block user comment: N
 Private report:     N

 New Comment:

Matt, please take a look to see what's going wrong here


Previous Comments:
------------------------------------------------------------------------
[2011-10-31 23:37:17] php at aldomx dot com

As additional information, using the same string with exec(), system() or 
passthru() works fine, proc_open() is the only one with this issue.

------------------------------------------------------------------------
[2011-10-31 23:13:03] php at aldomx dot com

Yes, same result

------------------------------------------------------------------------
[2011-10-31 23:08:37] [email protected]

Have you tries to use escape shell args?

------------------------------------------------------------------------
[2011-10-31 22:51:41] php at aldomx dot com

Sorry, I forgot to specify "when you use 2 or more quoted arguments" (in my 
example git directory in program files and working directory)

------------------------------------------------------------------------
[2011-10-31 22:43:35] [email protected]

Works just fine:

<?php
$descriptorspec = array(
   1 => array("pipe", "w"),
   2 => array("pipe", "w")
);

$cmd = '"c:\\test\\bin with space\\t.bat"';
$process = proc_open($cmd, $descriptorspec, $pipes);
echo stream_get_contents($pipes[1]);
echo stream_get_contents($pipes[2]);

$return_value = proc_close($process);
echo "command returned $return_value\n";

where t.bat contains only "dir" for testing

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=60181


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60181&edit=1

Reply via email to