Tuesday, September 24, 2019

phpmyadmin Failed to set session cookie. Maybe you are using HTTP instead of HTTPS

    Hy! Got this problem recently. After enabling apache2 log at trace8 level, find that the following directive in apache.conf was the problem:
 Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure

Of course, the above line instructs apache server to accept cookies only for https protocol requests, but my phpmyadmin was on localhost outside the virtual server for secure domain.
After disabling that directive, phpmyadmin started to work properly again!
More secure were if i would have been moved the entire phpmyadmin directory to a sub-directory in my secure domain, but, hey, nothing is perfect!

Hope this help somebody-sometime!

No comments:

Post a Comment