K
K
Kirill Kazakov2015-07-05 19:19:21
PHP
Kirill Kazakov, 2015-07-05 19:19:21

I can't log in to phpmyadmin, how can I understand what's wrong?

I have a VPS, it has nginx as a back-end, it listens on port 8080.
I'm trying to install phpmyadmin . Everything would seem simple, for example, here is the instruction .
BUT the fact is that if you strictly follow the instructions , then when you try to log in, a redirect occurs here

:8080/phpmyadmin/index.php?token=1ab6355650f59ed4f2e66c3af79aee78

(apparently due to the fact that nginx is listening on port 8080. To solve this issue, I add this config
location /phpmyadmin {
    root /usr/share/;
    index index.php;
    location ~ ^/phpmyadmin/(.+\.php)$ {
      try_files $uri =404;
      root /usr/share/;
      fastcgi_pass unix:/var/run/php5-fpm-def.sock;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include /etc/nginx/fastcgi_params;
      fastcgi_param SERVER_PORT 80;
    }
    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
      root /srv/www/;
    }
    }

.
Further, when trying to log in, it returns to the main page without errors.
Through the console, you can log in to mysql with the same password and user (root).
How to understand what's the matter?

UPD1:
Set authorization - http (in config.inc.php file)
$cfg['Servers'][$i]['auth_type'] = 'http';
, was able to log in, but any operation other than exit causes an error
token mismatch error


UPD2:

As a result, the problem was with this parameter

session.save_path


Which is by default in php.ini.
The problem was with the installed memcache , in the memcache settings there were such lines

session.save_handler = memcache


session.save_path = "tcp://localhost:11211"


After I disabled memcache and set the value

session.save_path=/tmp


Everything worked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2015-07-05
@reaferon

Why this is happening I will not tell you (but I will be happy to follow the answers in the subject).
Let me show you how I solved the exact same problem.
The problem was that I always took the latest version from github and constantly got broken authorization.
Delivered 4.2.13.3 - everything perfectly earned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question