IIS 7 and Above
Known Issues and Workarounds
IIS and PHP (via FastCGI) outside Inetpub directory
Last post Nov 15, 2017 08:30 AM by Yuk Ding
Nov 09, 2017 09:43 AM|fldv|LINK
I have a problem when I try to execute PHP scripts located outside the Inetpub folder.
To be more precise, I have a website located in another directory (C:\Users\myusername\OneDrive\Projects\websitename). I added a website via the IIS Manager that point to this folder (linked to
http://localhost:90). I added 2 files : one index.html and one
It works perfectly when I go to http://localhost:90/index.html. But when I go to http://localhost:90/index.php I get a blank page with "No input file specified." written
on it (with status 404). Then I copied the index.php file to the directory of the default website in
C:\Inetpub\wwwroot and when I go to http://localhost/index.php : it work !
As it work with HTML files, I don't think that it is a access permission problem. As PHP work when it is requested from the
Inetpub directory, I don't think it is a PHP problem.
Can anybody help please ? Does anyone faced this issue ?
Nov 13, 2017 09:51 AM|Yuk Ding|LINK
Please enable the detailed error message and display the error status code and physical path. And post it here. For .php default page, please ensure the PHP has been configured correctly in IIS. Secondly, please check whether the index.php has been set in
<add value="index.php" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
Just ensure the index.php are placed in the top of the order list. Then when I put the index.php to the root path of website like C:\Users\myusername\OneDrive\Projects\websitename. Then it will display the php index correctly. The default document
will always read the document file from wwwroot or root path. You could not specify the index path in IIS.
Nov 14, 2017 10:12 AM|fldv|LINK
Thanks for your reply.
I checked my default document config, it is already with index.php at the top.
The detailed error messages are already enabled, the error No input file specified. (404) comes from PHP so IIS wont show any error page.
Nov 15, 2017 08:30 AM|Yuk Ding|LINK
The error message means the PHP is not configured in IIS correctly, so please check whether you have missed something:
In addition, could you provide the substatus code of your IIS log.
Of course, you could try the steps in this link: