Failed to generate random CSRF token! (phpmyadmin

2019-02-19 12:28发布

问题:

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)?

回答1:

modify php.ini :

session.save_path = "c:\session"

grant modify c:\session permission to USERS

run command: iisreset



回答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.