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.