yes simple php works just fine, even the full mediawiki application works fine. i copied cmd.exe to my php folder as i had seen this as one resolution, and given how php-cgi.exe will attempt to load an application from its own folder before attempting through the system path, it made sense.
no, executing from an open command window php.exe c:\inetpub\wwwroot\forktest.php, or php-cgi.exe -f c:\inetpub\wwwroot\forktest.php does work. so the problem doesnt reside in php itself. its some sort of permissions issue, i believe.
here is a snippet that is failing from forktest.php
<?php
$result = 0;
$resultstr = system('echo %PATH%', $result);
echo "return value is $result \n";
echo "output string is $resultstr \n";
?>
output:
Warning: system() [function.system]: Unable to fork [echo %PATH%] in C:\inetpub\wwwroot\forktest.php on line 25
return value is -1 output string is
i went ahead and deleted the cmd.exe in my php folder and in procmon i am seeing exactly what should be happening, c:\windows\syswow64\cmd.exe.
it seems my problem is actually executing cmd.exe, not the application i am attempting to execute.