Welcome! Log In Create A New Profile

Advanced

Re: FastCGI PHP No input file specified.

February 22, 2011 03:48PM
On Tue, Feb 22, 2011 at 11:14:23AM -0500, alexk wrote:

> I have Zend Framework project working so all non static requests are
> forwarded to public/index.php. But now I need to allow PHP scripts from
> another folder - /generator/ to work as usual. So I've added another
> location and use "fastcgi_param SCRIPT_FILENAME
> /var/www/new/public/generator$fastcgi_script_name;"
>
> As a result it returns "No input file specified.". Not sure what's the
> problem is.
>
> Thanks for any help. Here you are config file:
>
> server {
> listen 80;
> server_name ***************;
>
> gzip on;
> gzip_types text/html text/css application/x-javascript
> application/javascript text/plain text/xml;
>
> charset utf-8;
>
> #access_log /var/log/nginx/localhost.access.log;
>
> location / {
> root /var/www/new/public;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;

fastcgi_index is useless here, because all requests are handled by
"/var/www/new/public/index.php"

> fastcgi_store off;
> fastcgi_store_access user:rw group:rw all:r;

fastcgi_store/fastcgi_store_access are not needed here.

> charset utf-8;
>
> fastcgi_param SCRIPT_FILENAME
> /var/www/new/public/index.php;
> include fastcgi_params;
> index index.php;

"index" is useless here, because all requests are handled by fastcgi_pass.

> }
>
> location /generator/ {
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_param SCRIPT_FILENAME
> /var/www/new/public/generator$fastcgi_script_name;
> include fastcgi_params;
> }

When you request "/generator/script.php", SCRIPT_FILENAME is equal
to "/var/www/new/public/generator/generator/script.php". You should
remove "/generator" from fastcgi_param SCRIPT_FILENAME:

fastcgi_param SCRIPT_FILENAME /var/www/new/public$fastcgi_script_name;


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

FastCGI PHP No input file specified.

alexk February 22, 2011 11:14AM

Re: FastCGI PHP No input file specified.

burningbunny February 22, 2011 11:26AM

Re: FastCGI PHP No input file specified.

Francis Daly February 22, 2011 01:10PM

Re: FastCGI PHP No input file specified.

Igor Sysoev February 22, 2011 03:48PM

Re: FastCGI PHP No input file specified.

alexk February 28, 2011 05:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready