No input file specified issue

Maxim Dounin mdounin at mdounin.ru
Thu Jan 13 17:00:20 MSK 2011


Hello!

On Thu, Jan 13, 2011 at 05:39:55PM +1300, Ryan B wrote:

> I'm getting "No input file specified." when I attempt to browse to the
> phpmyadmin domain, not sure what I'm doing wrong.. using both php-fpm and
> php-cgi, php-fpm is currently working another directory fine..Had to change
> the port number to 8888 since -fpm was already using 9000
> 
> http://pastebin.com/kdEckiL3
> 
> from nginx.conf:
> 
>     server {
>         listen 80;
>         server_name phpmyadmin.domain.com;
>         access_log /home/fanboy/logs/phpmyadmin.access_log;
>         error_log /home/fanboy/logs/phpmyadmin.error_log;
> 
>     location / {
>         root /usr/share/phpmyadmin;
>         index index.php;
>         }
> 
>     location ~ \.php$ {
>         fastcgi_pass 127.0.0.1:8888;
>         fastcgi_index index.php;

Just a side note: "fastcgi_index" is meaningless here.

>         fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
>         include /usr/local/nginx/conf/fastcgi.conf;

Include fastcgi.conf already contains SCRIPT_FILENAME, so your 
config results in two SCRIPT_FILENAME params sent to php, with 
only one of them being correct.  Depending on php version either 
first one or last one will be used by php.

So either use fastcgi_param file instead of fastcgi.conf, or 
(better) remove "fastcgi_param SCRIPT_FILENAME" and define root 
instead to make SCRIPT_FILENAME defined in fastcgi.conf correct.  
I.e. the following should work (note that root defined at server{} 
level):

server {
    ...
    root /usr/share/phpmyadmin;

    location / {
        index index.php;
    }

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:8888;
        include /usr/local/nginx/conf/fastcgi.conf;
    }
}

Maxim Dounin



More information about the nginx mailing list