Background: had a working Wordpress 3.7 site at olddomain.com.
I moved it to newdomain.com successfully, and in the process added this to wp-config:
I came across this error when trying to install a wordpress site on localhost. The problem was this line inside the .htaccess
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
It prevents cookies being set if not on https. Just had to remove the line.