#12300 [Opn->Fbk]: exec() family problems
| From: | sniper@php.net | Date: | Sat, 07 Dec 2002 02:06:12 +0000 |
| Subject: | #12300 [Opn->Fbk]: exec() family problems | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-26928@lists.php.net to get a copy of this message | ||
ID: 12300
Updated by: sniper@php.net
Reported By: marv@cyberia.net.lb
-Status: Open
+Status: Feedback
Bug Type: Program Execution
Operating System: WinXP
PHP Version: 4.3
Previous Comments:
------------------------------------------------------------------------
[2002-12-06 20:00:54] pollita@php.net
Try this:
<?php
$cmd="c:\\winnt\\system32\\cmd.exe /c test.bat";
echo "Executing command: [$cmd]\n";
system($cmd,$value);
echo "Return value is: $value\n";
?>
------------------------------------------------------------------------
[2002-11-05 06:08:28] twa@carlbro.dk
Maybe this bug duplicates this one:
http://bugs.php.net/bug.php?id=18958
------------------------------------------------------------------------
[2002-09-26 04:12:49] stepan.rybar@taskforce.cz
Yes, I have the same problem. For previous 24 hours I am trying to
execute any program using exec, shell_exec, passthru... and Unable to
fork or unable to execute. I have set up both IIS 5.1 and php.ini as
unsecure as possible (temporary ;-) and no success. But I was
successful on MS Windows ME, Apache 1.3.? and PHP 4.1.? for more than
one year. So I am not sure, if it is not IIS configuration problem or
problem with new directive in php.ini - cgi.something. I am running PHP
4.2.3 as a module.
Stepan
------------------------------------------------------------------------
[2002-09-21 09:02:56] marv@cyberia.net.lb
one year later :)
i've switched to a WinXP system. from the people who have posted
successful runs of system() and exec() on w2k and xp i thought it would
work.
however, it DOESN'T. i downloaded the latest dev version and tried
that. and it still doesn't happen.
it works fine in the command prompt (with php.exe and php-cgi.exe). but
in the browser (which uses php-cgi.exe) it gives the following:
Warning: system() [function.system]: Unable to fork
[D:\Website\projects\testbed\test.bat] in
D:\Website\projects\testbed\test.phpdev on line 6
so it doesn't hang the browser anymore but maybe that's because of xp's
shoot to kill policy.
i tried fiddiling with the permissions to see if its the cause. but
even with the most liberal permissions it gives the same result.
------------------------------------------------------------------------
[2002-09-20 19:53:01] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
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/12300
--
Edit this bug report at http://bugs.php.net/?id=12300&edit=1