Not Solved 'Authorization code mismatch' on fresh install
#1
Not Solved
Been trying to experiment with installing mybb onto my Ubuntu server on my LAN. All goes smoothly until I logout. Then although I can login to the ACP by going directly to <my ubuntu server ip>/mybb/admin/index.php I cannot login to the User CP with the Login button on the front end. A box pops up asking for my username/password but then always the error 'Authorization code mismatch. Are you accessing this function correctly?' Please go back and try again.' is returned. Just wondered if anyone's experienced this?

My Apache webroot is /var/www and mybb is installed into /var/www/mybb and accessed by browsing to <my ubuntu server ip>/mybb My Ubuntu user owns the /var/www/mybb folder and it's assigned to the www-data group.

Deleting the cookies for the site doesn't seem to help but I am able to login in In-Cognito mode. My cookie path is initially set to /mybb/ I tried changing it to / but that also didn't seem to help.

mybb 1.8.39
php 8.3.6
MySQLi 8.0.45
Ubuntu Server 24.04.4 LTS
---
Win 11 Pro 26200.8039
Chrome 146.0.7680.165
Reply
#2
Not Solved
I have several test servers setup using private server ip's.  In other words, using the web root not a sub-directory.  Cookie path becomes server ip/.  I get Authorisation code mismatch occasionally, but it always seems to work on retry.  I find my post key to be the most aggravating thing ever.  When it was introduced in 2018, Shade's fix was all you needed, but something changed in 2025 or so to change how it seems to work.

I have the same problem on domain subfolder configurations, where cookie path becomes /directory/

Hopefully someone will weigh in with the fix, which must exist.  Because this site seems unaffected.
Reply
#3
Not Solved
In the most of cases are due cookie path and url paths from settings, but sometimes are due some server privacy settings enabled to not allow to use other than root path to use it as forum path without some server configurations to allow that. It is complicated but i saw that both cases and yeah it can be fixed and put it to work but you may read some documentations before using it that way.

Try to use your server root path, not in a new folder and if all works fine then you will have it, the problem is due that server restrictions enabled to not allow other than root. If even in your root path does not work, then it must be the problem with settings about cookies and url paths as far as i know.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply
#4
Not Solved
(2026-04-01, 01:28 AM)Whiteneo Wrote: In the most of cases are due cookie path and url paths from settings, but sometimes are due some server privacy settings enabled to not allow to use other than root path to use it as forum path without some server configurations to allow that. It is complicated but i saw that both cases and yeah it can be fixed and put it to work but you may read some documentations before using it that way.

Try to use your server root path, not in a new folder and if all works fine then you will have it, the problem is due that server restrictions enabled to not allow other than root. If even in your root path does not work, then it must be the problem with settings about cookies and url paths as far as i know.

For a long time, I've suspected something might be causing issues with the apache configuration on our web host.  I'm not actively working in this problem anymore, but moving my test servers to the document root was largely successful, so I like the idea.  Restoring nightly backups to the web root, then editing theme style sheets, largely does the trick.

Thanks for the tips.
Reply
#5
Not Solved
No problem, many users have the same issue before so i had helped to fix it successfully.

It is glad to hear that helped you. And i hope that will help another users in the future.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)