#12300 [Com]: exec() family problems

From: Date: Thu, 26 Sep 2002 09:12:49 +0000
Subject: #12300 [Com]: exec() family problems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20384@lists.php.net to get a copy of this message
 ID:               12300
 Comment by:       stepan.rybar@taskforce.cz
 Reported By:      marv@cyberia.net.lb
 Status:           Open
 Bug Type:         Program Execution
 Operating System: WinXP
 PHP Version:      4.3
 New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[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



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

[2001-10-24 09:02:57] marv@cyberia.net.lb

Tried it on 4.0.7, 4.1RC1a (with the win patch) and 4.2-dev
Failed on the lot of them with same behaviour (works in the command
prompt, hangs in the browser).



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

[2001-10-24 06:30:21] sander@php.net

Can you try the latest CVS? Or a development-binary from
http://208.44.124.20/php-dev-win/

Does this problem still occur?

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

[2001-07-21 14:41:42] marv@cyberia.net.lb

exec(), system(), etc. cause php to hang when called through the
browser. when executed from the command line, it works fine.

I'm running PHP4.06, PWS, Win98SE. I'm using the PHP binary downloaded
from php.net.

I have a batch file, test.bat which contains one line:
echo Hello

My PHP script is:

$cmd="test.bat";
echo "Executing command: [$cmd]\n";
system($cmd,$value);
echo "Return value is: $value\n";

When I run this from the command line, ie. php test.bat, it works as
expected. When I call the script from the browser, a command window
opens and closes quickly, I get no output in the browser and the
browser keeps trying to load the script. If I hit stop, the browser
stops with nothing retrieved at all. PHP is still listed in the task
list when pressing CTRL+ALT+DEL.


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


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



Thread (1 message)

  • stepan dot rybar at taskforce dot cz
  • Unknown Message
    • stepan dot rybar at taskforce dot cz
« previous php.bugs (#20384) next »