Php + fastcgi encountered Noinputfilespecified. Error

Source: Internet
Author: User
Recently, lighttpd + fastcgi + php or nginx + fastcgi + php is often frustrated by php's "Noinputfilespecified.". let's talk about my situation.

Recently, lighttpd + fastcgi + php or nginx + fastcgi + php is often frustrated by the "No input file specified." of php. let me explain my situation.

First, in the configuration of php. ini

Cgi. fix_pathinfo = 1
Doc_root =

I have set a path for doc_root. as a result, php always prompts "No input file specified.". Only one VM can be used. After the change, it will be normal.

Configuration in nginx is troublesome.

Fastcgi_pass 127.0.0.1: 1234;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME/var/www/html $ fastcgi_script_name;

Each virtual machine must set an inaccessible directory based on its own virtual machine. ensure that the path is correct.
Fastcgi_param SCRIPT_FILENAME/var/www/html $ fastcgi_script_name; cannot be in front of fastcgi_pass 127.0.0.1: 1234.

Remember to restart the fastcgi service after modifying php. ini.

In fact, it was caused by carelessness. it was very easy to write and remind myself.

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: info-contact@alibabacloud.com 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.