'Failed to generate random CSRF token! (phpmyadmin 4.6.4)

I installed newest versions of MySQL, IIS (on windows 10) and PHPMyAdmin.

But PHPMyAdmin 4.6.4 returns an error:

Failed to generate random CSRF token!

If I use PHPMyAdmin 4.0.4.1 I can connect to my local mysql server.

How can I fix this problem in PHPMyAdmin 4.6.4 (on windows IIS)?



Solution 1:[1]

modify php.ini :

session.save_path = "c:\session"

grant modify c:\session permission to USERS

run command: iisreset

Solution 2:[2]

royhutw is kind of right.

The default session.save_path is C:\Windows\Temp. If you're getting this error IIS probably doesn't have permissions to create a session file there.

Only thing you'll have to do is give "IUSR" modify permissions on this folder and reload your phpMyAdmin page.

Solution 3:[3]

I will write here, maybe it will be useful to someone. I have a similar problem but with mysql 8 on debian 9 and sometimes I get an error token. This kind of stupid solution works for me: I change the line in php.ini:

session.save_path = "/ var / lib / php / sessions"

For anything, later I run:

sudo service apache2 restart

And once again I change the exchange line above to the correct one and reset again and I can log in to phpmyadmin ...

Solution 4:[4]

In the web browser, manually delete the entry "phpMyAdmin", it will be solved easily. For mine it worked!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Machavity
Solution 2 RoelVB
Solution 3 Mateusz Czerwi?ski
Solution 4 mehrdad seyrafi