Jump to content

Problem with any execution functions, Windows Server 2k3


trink

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.