0

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;
    fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
    include /usr/local/nginx/conf/fastcgi.conf;
    }
}

2 Answers 2

2

A better way will be relocate your "root" line out of your location block.

server {
    listen 80;
    server_name phpmyadmin.domain.com;
    access_log /home/fanboy/logs/phpmyadmin.access_log;
    error_log /home/fanboy/logs/phpmyadmin.error_log;

    root /usr/share/phpmyadmin;

    location / {
        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;
    }
}

Apparently nginx server configuration some how missed the document root setting.

Got this idea from Nginx Configuration Guide for PHP FastCGI.

2
  • Awesome. This worked. Kudos! Sep 19, 2013 at 11:44
  • Glad it helps :) Dec 10, 2013 at 4:23
1

fastcgi.conf is redefining SCRIPT_FILENAME to $document_root$fastcgi_script_name. If you set the root in the server (Just remove the "location / {" and matching }) and remove the SCRIPT_FILENAME line from your php location, it should work fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .