#12300 [Com]: exec() family problems

From: Date: Fri, 25 Apr 2003 09:47:55 +0000
Subject: #12300 [Com]: exec() family problems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38356@lists.php.net to get a copy of this message
ID: 12300 Comment by: mellott at tin dot it Reported By: marv at cyberia dot net dot lb Status: Bogus Bug Type: Program Execution Operating System: WinXP PHP Version: 4.3 New Comment: very good work marv, I have lost a lot of time for this problem. Previous Comments: ------------------------------------------------------------------------ [2002-12-08 03:20:32] sniper@php.net Not PHP bug. ------------------------------------------------------------------------ [2002-12-07 09:24:41] marv at cyberia dot net dot lb finally got it to work! i couldn't make PHP use cmd.exe in the system32 directory since its not allowed to read from that directory. however, i copied cmd.exe into the script's directory and it worked. putting cmd.exe in php.exe's directory also worked. and i dont need to specify the command as "cmd.exe /c test.bat". using just "test.bat" works just fine. so i guess the whole issue is having cmd.exe readable to php.exe and the simplest way to do that is placing cmd.exe in php.exe's directory. making system32 readable to PHP wouldn't very secure, since you would have to make it readable to all webserver processes. ------------------------------------------------------------------------ [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 at carlbro dot dk Maybe this bug duplicates this one: http://bugs.php.net/bug.php?id=18958 ------------------------------------------------------------------------ [2002-09-26 04:12:49] stepan dot rybar at taskforce dot 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 ------------------------------------------------------------------------ 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

« previous php.bugs (#38356) next »