The solution to the no input file specified

Source: Internet
Author: User
Tags iis ini ini file comment php tutorial

A IIS noinput file specified

Method One: Change the Doc_root line in the php.ini, open the INI file comment out the row, and then restart IIS

Method Two:

Please modify the php.ini

Found it

; Cgi.force_redirect = 1

Remove the front semicolon and change the following 1 to 0.


Cgi.force_redirect = 0

(ii) Apacheno input file specified

Apache No input filespecified, today is when we configure the Apache Rewriterule this problem, the solution is very simple as follows

Open. htaccess add a "?" after the index.php tutorial after Rewriterule.

The complete code is as follows

. htaccess

Rewriteengine on

Rewritecond $!^ (index.php|images|robots.txt)

Rewriterule ^ (. *) $/index.php?/$1 [L]

If there is a problem with the Apache server, check to see if the Apache file resolution of the PHP suffix is problematic.


What suffixes does Apache parse as PHP? For example, let Apache parse the file of the. php suffix into PHP. You can resolve any suffix file to PHP as long as you add it in the following statement and separate it with a space. Here to add a. phtml example.

AddType application/x-httpd-php. php. phtml

To highlight the. Phps Tutorial as a source file for PHP, you can also add:

AddType Application/x-httpd-php-source. Phps

Start Apache with the usual procedure (you must completely stop Apache and reboot instead of using the HUP or USR1 signal to reload Apache).

(iii) Nginx configuration encounters no Inputfile specified

Virtual machine Test Nginx encounter noinput file specified, multi-party lookup finally found a solution

1, php.ini (/etc/php5/cgi/php.ini) configuration of these two

Cgi.fix_pathinfo=1 (This is added by yourself)


2, nginx configuration file/etc/nginx/sites-available/default Note the following sections

Location ~. php$ {


Fastcgi_index index.php;

Fastcgi_param Script_filename/var/www/nginx-default$fastcgi_script_name;

Include Fastcgi_params;


The red part path needs to be filled out according to the actual situation of your host directory

After configuring the above section, restart the service nginx restart, it should be no problem

(iv) Check to see if the Site Directory has write access to the relevant users

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.