2

I'm running a site under IIS with PHP running in CGI mode. PHP was installed to a pre-existing site so a handler was setup for .html files to be parsed by PHP as well as .php files.

When a non-existent page with a .php extension is requested, a 404 is thrown and user is redirected to the custom 404 page, however when a non-existent page with a .html extension is requested the "No input file specified." error is shown.

I've searched this error and found potential solutions for similar issues but nothing that solves this particular boggle. Any ideas or pokes in the right direction would be much appreciated!

2 Answers 2

4

Try the Invoke handler only if request is mapped to file option for the handler under request restrictions.

Sign up to request clarification or add additional context in comments.

3 Comments

IIS 7 > Site > Handler Mappings > Edit handler > Request Restrictions > Mapping tab > Check "Invoke Handler only if request is mapped to:" > Select "File or folder"
Also take care with open_basedir directive on your main php.ini config file. If you are using it, make sure to include all physical paths to your desired files. In development environment you can safely comment it with ;open_basedir
This doesn't work for me. It was already same but I still get this error.
1

First. Open "PHP Manager" and check warnings in yellow there. Follow advice there. There is a helpful page to resolve such issues from Microsoft at https://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/using-php-manager-for-iis-to-setup-and-configure-php

Second. Check permissions to the folder of the app. User running AppPool should be given an access.

Hope it helps someone wandered here!

1 Comment

Worked for me. Some of those recommended options change what data php fastcgi is provided in regards to url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.