trink Posted March 27, 2009 Share Posted March 27, 2009 I'm working with PHP on a Windows 2k3 server, and I have a script that is called via AJAX that has to run a shell_exec() command. I've given Read and Execute permissions for the IUSR_ and IWAM_ accounts on cmd.exe, but nothing has come of it. The problem is that when I call shell_exec(), exec(), system(), or any command that performs an execution of a program, it hangs. If I deny permissions to IUSR_ and IWAM_ then it returns an empty string and exits. I've tried it on exec() as well and the script will finish up as expected, but will not execute the command that I'd like it to execute. We are currently using PHP 5.2.4. Would an upgrade to 5.2.9 fix this? Could this be a problem with coding? Could it be a problem with Windows? Or is this a much larger monster than I first thought? Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 27, 2009 Share Posted March 27, 2009 This may or may not apply to IIS, but in the control panel services menu, select the IIS service and in the LogOn tab, if there is a check box for "Allow service to interact with desktop", select it. Stop and start the IIS service to get any changes made to take effect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.