Just spent half-hour figuring out why PHP does not want to run shell_exec() command. Might as well write it down here for future reference.
Go to IIS -> Fast CGI settings:
FastCGI in IIS

There select your PHP application, click Edit on right hand side.
Then expand Advanced Settings and change protocol to TCP.

enter image description here

Save and DONE!

  • lizi

    omg thank you!! thank you!!

  • Evandro Simenes

    Your post saved my life. Thank you!

  • Dolphyn5

    Thanks, this solution appears to work on IIS 10.

  • Peder Wikström

    I cannot find any “FastCGI settings” in IIS 10, only CGI. Installed PHP manually and followed these instructions for setting upp handler mappings etc. https://jamesmccaffrey.wordpress.com/2017/01/26/installing-php-on-windows-10-and-iis/

  • Babin Kanakaraj

    Thanks a bunch!! You saved me..