I'm using PsExec to run a command line program without having to wait for it to finish to report back to the script that ran it. I'm using a PHP script to run it. When I run the PHP script manually on the server, everything runs fine and works as expected. However, when I run the PHP script through the webserver using a GET request to send my parameters, it just hangs. Specifically, it hangs at the exec() that initiates the psexec command. Just hangs and hangs forever, until Apache sends out a max execution time error. Why is it hanging, and how can I fix it?

Operating system is Windows Server 2008


Try psexec /accepteula in your script.

  • 1
    Why is it always something so simple?! Thank you so much. – Rob Oct 6 '11 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.