Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get phpmyadmin up and running on my server. Here's the nginx vhost for it:

server {
    listen 80;

    location /phpmyadmin/ {
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;

        include /opt/nginx/conf/fastcgi_params;
        alias /usr/share/phpmyadmin/;

    root /opt/nginx/html/;

Here's my fastcgi_params file

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

I compiled lighthttpd so I could pull out spawn-fcgi. That is now sitting in /usr/local/bin and is accompanied by my php5-cgi launcher which looks like:

/usr/local/bin/spawn-fcgi -a -p 9000 -u www-data -C 2 -f /usr/bin/php5-cgi

I run this and can see that it's successfully launched by doing a ps aux | grep php.

However, whenever I try to open phpmyadmin, I get the error "No input file specified"

What am I doing wrong? :/

share|improve this question

"No input file specified" is the error PHP gives when it cannot find a file at the path it's given. Nginx passes this path in fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;

Your error is that $fastcgi_script_name; contains the URI, since you're in location /phpmyadmin/ that means the URI is /phpmyadmin/whatever.php. Therefore you're essentially passing /usr/share/phpmyadmin/phpmyadmin/whatever.php.

If you correct your path it should work.

share|improve this answer
That fixed it. Cheers. – user58277 Oct 27 '10 at 0:29
Good to know. Could you accept the answer then? – Martin Fjordvald Oct 27 '10 at 5:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.