RE: "CreateProcess failed" when proc_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I solved the problem.

Php 5.2.1 still use cmd.exe for run any executables (or may be I have made
mistake in "other_options"). 
But Win2003 does not give read and execute permission on cmd.exe for simple
users and guest users especially, and IIS 6 (unlike Apache) runs website
under very restricted user, who, of course, have no permissions for reading
and executing the cmd.exe.

If you need to run executables in php code under IIS6 control, you must give
read and execute permission on cmd.exe to users, IIS6 uses to run websites
under.

С уважением,
Александр Рыбин,
директор группы "Алланд"
icq: 13391736,
www.allandgroup.ru
 

-----Original Message-----
From: Gustav Wiberg [mailto:gustav@xxxxxx] 
Sent: Tuesday, February 27, 2007 9:49 AM
To: 'Alexander Rybin'; 'php-windows@xxxxxxxxxxxxx'
Subject: RE:  "CreateProcess failed" when proc_open()

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@xxxxxxxxxxxxxx] 
Sent: Saturday, February 24, 2007 3:20 PM
To: php-windows@xxxxxxxxxxxxx
Subject:  "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

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux