RE: [PHP-WIN] "CreateProcess failed" when proc_open()
| From: | Gustav Wiberg | Date: | Tue, 27 Feb 2007 06:49:00 +0000 |
| Subject: | RE: [PHP-WIN] "CreateProcess failed" when proc_open() | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-27523@lists.php.net to get a copy of this message | ||
Hi there!
I don't know, but this may give you a clue?
Grabbe from http://se2.php.net/manual/sv/function.proc-open.php
"Not: Windows compatibility: Descriptors beyond 2 (stderr) are made available to the child
process as inheritable handles, but since the Windows architecture does not associate file
descriptor numbers with low-level handles, the child process does not (yet) have a means of
accessing those handles. Stdin, stdout and stderr work as expected.
Not: If you only need a uni-directional (one-way) process pipe, use popen() instead, as it is much
easier to use."
Best regards
/Gustav Wiberg
-----Original Message-----
From: Alexander Rybin [mailto:rybin@allandgroup.ru]
Sent: Saturday, February 24, 2007 3:20 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] "CreateProcess failed" when proc_open()
Hi!
Could anyone help me.
Here is my problem.
I need to start new external process. I do it by the next code:
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child
will read from
1 => array("pipe", "w"), // stdout is a pipe that the
child will write to
2 => array("pipe", "w"), // stderr is a file to write to
);
$hf = proc_open( $ex_path, $descriptorspec, $pipes );
$ex_path is a correct path to my executable. However, I get "CreateProcess
failed" when it runs.
I have IIS 6, running in its native process model. Also I have PHP 5.2.1.
What's wrong? Please, help!
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php