![Solved: 5 Years, 5 Months, 4 Weeks ago Solved: 5 Years, 5 Months, 4 Weeks ago](https://community.mybb.com/images/mysupport_solved.png)
I have freshly installed MyBB on FreeBSD. When I try to login to forums I've got "Authorization code mismatch. Are you accessing this function correctly? Please go back and try again." error.
I can log in into ACP, but I've got login page after every move on ACP
As I understand, problem is, that by some reason MyBB doesn't set a cookie for me (I checked it in my browser - there are no cookies from MyBB after login)
MyBB URL: http://185.22.232.134:8080/forum/
I've checked in inc/settings.php:
it looks right according to that
I can't understand why is so.
PS during installation I've noticed, that some modules needed for MyBB weren't installed by default (for example, php72-mysqli php72-xml php72-filter php72-hash). Maybe the reason could be that I need to install some module or configure my apache?
On that server I have another site on Django - it works fine
PPS I made a test page http://185.22.232.134:8080/forum/test.php
and I see, that cookie was set:
Name: TestCookie
Value: ahalya
Host: 185.22.232.134
Path: /forum
Expires: Thu, 18 Jul 2019 22:17:40 GMT
Secure: No
HttpOnly: No
I can log in into ACP, but I've got login page after every move on ACP
As I understand, problem is, that by some reason MyBB doesn't set a cookie for me (I checked it in my browser - there are no cookies from MyBB after login)
MyBB URL: http://185.22.232.134:8080/forum/
I've checked in inc/settings.php:
$settings['cookiedomain'] = ".185.22.232.134";
$settings['cookiepath'] = "/forum/";
it looks right according to that
I can't understand why is so.
PS during installation I've noticed, that some modules needed for MyBB weren't installed by default (for example, php72-mysqli php72-xml php72-filter php72-hash). Maybe the reason could be that I need to install some module or configure my apache?
On that server I have another site on Django - it works fine
PPS I made a test page http://185.22.232.134:8080/forum/test.php
<?php
$value = 'ahalya';
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600);
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", "example.com", 1);
?>
and I see, that cookie was set:
Name: TestCookie
Value: ahalya
Host: 185.22.232.134
Path: /forum
Expires: Thu, 18 Jul 2019 22:17:40 GMT
Secure: No
HttpOnly: No