When you host your PHP website on Windows Server IIS, you may receive an “No input file specified” error message, when a HTTP request is made to non-existing .php files. When this happens you probably have no Request Restrictions configured in IIS’ PHP handler settings. Here is how to resolve the no input file specified error.

In order to fix the no input file specified PHP error, you have to configure Request Restrictions in IIS for the *.php handler.

In IIS Manager, open up the Handler Mappings under your server node. Scroll down to Name PHP, or Path *.php, and double click to open up its properties. See the image below.

IIS 10 Module Mappings for *.php handler
IIS 10 Module Mappings for *.php handler

Click Request Restrictions to get the following screen where you can configure and set handler mappings:

IIS 10 Request Restrictions set for *.php, to invoke the handler only for if request is mapped to  a file
IIS 10 Request Restrictions set for *.php, to invoke the handler only for if request is mapped to a file

Psst, want to know how to properly configure PHP on IIS?


Is this post worth a small donation to you? Did it help you solve a problem? Or just want to say thanks?

If you found this post interesting, or it helped you solve a problem , why not buy me a coffee?

A small donation of only $5 helps out a lot in the development, research and hosting of this blog.

If I’ve helped you out and you want to thank me, why not buy me a coffee?

Thank you for your support.