MyBB Community Forums

Full Version: mybb doesn't set cookies?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
$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
Try setting the cookie domain to be empty, it sometimes doesn't work with IP addresses.