MyBB Community Forums

Full Version: Logging in does not work, no cookie is generated
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have just installed MyBB 1.8.1.2 on a WAMP stack inside a Docker container. It's Apache 2.4, MySQL 5.6.35 and PHP 7.0.14.

When I try my first login with my Administrator account, the login is successful, but the next page shows I'm not logged in. In the Google Chrome developer console, I can observe that there is no cookie to my domain.

My forum is hosted inside  of a virtual network and does not face the Internet. I do currently not have a DNS name associated with it. My cookie domain is configured to be ".<my-IP>" and my path is configured to be "/". I access my forum through "http://<my-IP>:xxxx/".

Does anyone have a clue as to what could be wrong? This is a completely fresh install where I accepted all the default settings.
Probably issue with cookie only, check this article and see if your cookie settings are correct :-
https://docs.mybb.com/1.8/development/cookies/
Happens to me all the time with vanilla WAMP installs. The issue is likely with your MyBB cookie settings specifically, as WallBB said. It doesn't always play well with localhost right away, so mess with your cookie path because I'd bet $50 that's the problem. I notice myself the issue normally arises if I've installed Apache to use a different default port (ie: localhost:12345 vs 80) because MyBB's install wizard doesn't usually detect this.
I have not solved the problem, but I've discovered that it's only Google Chrome which has this issue. It worked fine with both Internet Explorer and Mozilla Firefox. Weird.

EDIT: I discovered Google made a design decision to disable cookies for websites without DNS names. https://bugs.chromium.org/p/chromium/iss...l?id=56211

My solution was to set the cookie domain to "" in settings.php. Not ideal for production environments, but it works just fine for me.
(2017-08-17, 08:08 AM)experiment002 Wrote: [ -> ]I have not solved the problem, but I've discovered that it's only Google Chrome which has this issue. It worked fine with both Internet Explorer and Mozilla Firefox. Weird.

EDIT: I discovered Google made a design decision to disable cookies for websites without DNS names. https://bugs.chromium.org/p/chromium/iss...l?id=56211

My solution was to set the cookie domain to "" in settings.php. Not ideal for production environments, but it works just fine for me.

Oh wow weird...had no idea that's literally never come up for me before lol. Glad you figured it out though, definitely useful to know.