Can't log in - "Error: Form security failed." RESOLVED

I have just installed Piwik. However, I can’t log in. I keep getting the following message:

Error: Form security failed. Please reload the form and check that your cookies
are enabled. If you use a proxy server, you must configure Piwik to accept the
proxy header that forwards the Host header. Also, check that your Referrer
header is sent correctly.

I have read through the many other related topics on this site, and tried them, but to no avail. It seems this is an ongoing problem with Piwik. I do really like what I’ve read and want to get started. (I am using the script I installed myself on a BlueHost server.) Any new solutions on this? This is very frustrating.

1 Like

I was really hoping to get this issue settled quickly (especially since it seems to have been happening to many others for quite a while now, although random).

I found the problem myself. It was a section in my .htaccess file:

<IfModule mod_headers.c>
RequestHeader unset Cookie
Header unset Set-Cookie

It seems to be working fine now.


Just to explain why this is the solution: This lines disallow apache to set any cookies which makes a login impossible.

Thanks. I had put that in there a while back to stop cookies and forgot it was there.