1
votes

I have phpMyAdmin running on Nginx. When I try to log in the only thing that happens is the url param "token" refreshes/updates. I'm not actually redirected to the main phpMyAdmin page and I don't receive any errors.

Here is my server block:

server {
    server_name localhost;
    location {
        root /usr/share/phpMyAdmin;
        index.php index index.html index.htm;
    }
    location ~ \.php$ {
        root    /usr/share/phpMyAdmin;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    access_log /var/log/nginx/phpmyadmin.access.log;
    error_log /var/log/nginx/phpmyadmin.error.log;
    include /etc/nginx/global/common.conf;
} 

Here is a link to my common.conf file, http://pastebin.com/13F9bXSR

Here are the last two lines of my access.log file:

[25/Apr/2014:10:39:04 -0500] "POST /phpMyAdmin/index.php HTTP/1.1" 302 5 "http://ip.addr.here/phpMyAdmin/index.php?token=86419bd6905a7db027f7e0723d01484f" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36" "-" 172.16.2.231 - - [25/Apr/2014:10:39:04 -0500] "GET /phpMyAdmin/index.php?token=d49df5c1271c93c59d39f9fcda2d042a HTTP/1.1" 200 2931 "http://ip.addr.here/phpMyAdmin/index.php?token=86419bd6905a7db027f7e0723d01484f" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36" "-"

Here is the last line of my error.log file:

2014/04/25 12:17:23 [warn] 11865#0: *2 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: ip.addr.here, server: ip.addr.here, request: "GET /phpMyAdmin/js/get_scripts.js.php?token=3631986de7e454290267650bd8acecdc&scripts[]=jquery/jquery-1.8.3.min.js&scripts[]=ajax.js&scripts[]=keyhandler.js&scripts[]=jquery/jquery-ui-1.9.2.custom.min.js&scripts[]=jquery/jquery.sprintf.js&scripts[]=jquery/jquery.cookie.js&scripts[]=jquery/jquery.mousewheel.js&scripts[]=jquery/jquery.event.drag-2.2.js&scripts[]=jquery/jquery-ui-timepicker-addon.js&scripts[]=j$

Also, if I open up my phpmyadmin config.inc.php file and replace this:

$cfg['Servers'][$i]['auth_type'] = 'cookie';

with this:

$cfg['Servers'][$i]['auth_type'] = 'http';

I can log in but I can't preform any funcitons. I get an error saying "Error: Token mismatch".

1
Did you find a solution for this?Neel

1 Answers

0
votes

try in nginx config :

http {

     ...

     proxy_max_temp_file_size 0;

     proxy_buffer_size 4k;
     proxy_buffers 32 4k;