PHP on IIS: No input file specified.

Photo of author
Written By Jan Reilink

Windows Server system administrator & enthusiast.

Here is how to resolve the no input file specified error with PHP and IIS. 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.

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

Want to learn how to properly configure PHP on IIS?


Did you like: PHP on IIS: No input file specified.

Then please, take a second to support Sysadmins of the North and donate!

Your generosity helps pay for the ongoing costs associated with running this website like coffee, hosting services, library mirrors, domain renewals, time for article research, and coffee, just to name a few.



2 thoughts on “PHP on IIS: No input file specified.”

  1. None of these solutions worked for me. At this point, I need to find something other than PHP to use in web pages. I’m tired of this problem occurring over and over again. PHP is a defective product. Any suggestions?

    Reply
  2. FYI, I had a similar “No input file specified” problem on my Windows IIS server. The solution was to DISABLE the “doc_root” setting in my php.ini file. After doing that and running an IISRESET everything worked again.

    Reply

Hi! Join the discussion, leave a reply!

%d bloggers like this: