No input file specified

Ever had the dreaded "No input file specified" error when trying to get PHP working on IIS? Well a week or two ago while setting up a new Windows 2008 server I had a bit of a daft moment were I got stuck with this very error for longer than I care to admit. The solution in the end was rather simple.

It took me near an hour to track down what should have taken me only a few minutes. I'd checked and rechecked all my php.ini settings, environment variables, IIS Application mappings, NTFS permissions, the lot. Live and learn they say.

In the end all that was causing the issue is that by default a new install of Windows 2008 Server hides known file extensions by default. So when I installed PHP, right clicked in the webroot and selected new text document and saved as phpinfo.php the file was actually saved as phpinfo.php.txt. Simple as it is I can tell you this little gem had me stumped, and then a little red faced when I found the problem.

So should you find yourself facing the same dreaded "No input specified" error, take a moment and ensure that you have cleared the "Hide file extensions for known file types" tick box. This can be done from the Views tab under the Folder Options menu item from in the Tools menu in Windows Explorer. If you've ever found other reasons for experiencing the "No input specified" when using PHP on IIS, then I'd love to hear about it.

Average rating
(4 votes)


Anonymous's picture

hmm, didn't help me

i did a standard install of phpmyadmin, and getting the error on the home page which i know is a .php file. still looking. -

Brashquido's picture

Pathing or permission issue

This error is also often cause by a pathing and/or permissions issue. It can also be caused when certain php.ini directives are enabled which shouldn't be on IIS, such as doc_root. Are you using php in ISAPI or FastCGI/CGI mode?
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster

Anonymous's picture

U saved me grief

TY for posting this!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Anonymous's picture

Thank you!

I feel so stupid! Thank you so much for posting this, saved me from pulling my hair out! :)

Anonymous's picture

you're not alone!!

thank god you posted this! I did exactly the same.... duh.

Anonymous's picture


Thanks for this forum. After searching for few hours looking to find out the problem, thank for those good tips.

doc_root was my problem. So simple... Next time I'll start looking on forums before trying to solve by myself.

thanks again


Anonymous's picture

No File input specified

Man, I had exactly the same problem and I went straight back and rectified the extension. I am now in business. Thanks.

Anonymous's picture

Another thanks for doc_root

While I know it wasn't mentioned in the main post, I do appreciate hosting the discussion that lead to the doc_root discovery!

I'm going to keep that "hidden extensions" trick in my belt for when it hits me later. Thanks a ton!

Josh_Maxwell's picture


Oh geez, it was the "doc_root" issue for me. I installed Apache to run along side IIS and had to uncomment that line. Commented it out again & everything works. Man, thank you!

Anonymous's picture

doc_root got me too! Doh!

doc_root got me too! Doh! But thanks to this helpful post im up and running smoothly! Thanks so much!