-->

pesky popular “No input file specified.” with ngin

2019-02-16 09:46发布

问题:

I didn't have this problem earlier until I changed the include path on my php.ini in hopes of being able to upload to a dir outside the docroot. When I encountered the "No input file specified." error I changed it back to the default php.ini and now it won't go away!

Any ideas on what might've happened?

回答1:

in file /etc/php-fpm.d/www.conf

change

user: nginx

group:nginx



回答2:

Edit nginx.conf

http{
....
server{
....
location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  D:\WebRoot\www\$fastcgi_script_name;
        include        fastcgi_params;
    }
}}

replace D:\WebRoot\www\ with the root of your webserver