# No input file specified issue

**URL:** <https://www.ruby-forum.com/t/no-input-file-specified-issue/201704>\
**Category:** NGINX\
**Created:** [January 13, 2011, 5:41am UTC](https://www.ruby-forum.com/t/no-input-file-specified-issue/201704 "2011-01-13T05:41:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 13, 2011, 5:41am UTC](https://www.ruby-forum.com/t/no-input-file-specified-issue/201704/1 "2011-01-13T05:41:41Z")

</div>

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

> **[from nginx.conf: server { listen 80; server\_name phpmya -...](https://pastebin.com/kdEckiL3)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

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;
    fastcgi_param SCRIPT_FILENAME 

```

/usr/share/phpmyadmin$fastcgi\_script\_name;  
include /usr/local/nginx/conf/fastcgi.conf;  
}  
}

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 13, 2011, 3:01pm UTC](https://www.ruby-forum.com/t/no-input-file-specified-issue/201704/2 "2011-01-13T15:01:41Z")

</div>

Hello!

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

> ```
> listen 80;
> 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 D.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 15, 2011, 7:51am UTC](https://www.ruby-forum.com/t/no-input-file-specified-issue/201704/3 "2011-01-15T07:51:17Z")

</div>

Thanks that worked a treat 🙂
