MyBB Community Forums

Full Version: I can log in to Admin CP, but not the board
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I've just moved a site to a new hosting provider, and also from Windows hosting to *nix hosting.

I have my board up and running - I thought everything was fine. Then...

As my Admin user, I can log in to the Admin CP just fine, and configure and control the board.

However, I have tried to log in to the board directly, both as my admin user, and as my regular user and... nothing happens.

The dialog for user/pass comes up, I enter my credentials, and hit Login. The dialog goes away, and the board is there as before, but I don't show as being logged in - my username doesn't appear, and the Login link is still present instead of Logout.

I have cleared my cookies.

I am about to go hunting for any errors that may have been logged. In the meantime, any ideas would be appreciated.

Thanks!

Additional Information (had this on my clipboard, and forgot to paste):

MyBB Version 1.8.12
PHP Version 7.2.22
SQL Engine MySQLi 5.7.25

I can make the site available if need be, but right now I'm directing everything to an index page, so the board is not available publicly. If someone wants to take a look, I can arrange that.

Thanks in advance.
Do you get the message "login Authorization code mismatch. Are you accessing this function correctly? Please go back and try again." when you login? or it just redirects you to main page?
@DoctorX: There is no message that I can see.

The login dialog just goes away, and the main page reloads, but I'm not logged in.

I have been looking at the network panel in the firefox developer tools. It looks like requests being made as the main page loads are being generated as simply 'mysite.com/filename.ext', but each of those requests gets a 301 not found, then another request is made for the same file as 'www.mysite.com/filename.ext', and those requests are served.

It seems like this may be causing the issue, but I don't know which thing is responsible for the behavior or how to change it. Does this seem plausible, and does anyone know how to change it?

Thanks in advance.

I've also just confirmed that for my Admin CP, all of the requests are being made with the full 'www.mysite.com', and as stated before, I can login just fine. It's only the board itself that is behaving this way.
Make sure what URL your forum is using.

Current MyBB architecture doesn't support canonical names natively, it only serves from a single domain name. This means if you set your MyBB's URL (including domain name and path) to https://www.mysite.com/forum , you may encounter some issues if you access your forum via https://mysite.com/forum .Also, you should make sure the cookies settings are correct.

Check this post https://community.mybb.com/thread-224737...pid1336290 for forum URL and cookies settings.

BTW, HTTP 301 is moved permanently and 404 is not found. The 301redirect may be served by your HTTP server but not MyBB unless you have some plugins for that.
@MisterAcoustic can you post your url so we can take a look?
Alright!

Here's the story for anyone else in a similar situation.

My current hosting provider is dreamhost.

There are two settings that were at play here, causing this issue. The first one is that in the dreamhost control panel for the domain, they offer a setting for "Do you want the www in your URL?", with three alternatives: Add www, remove www, and leave alone (keep it if the url has it, and don't add it if it doesn't). Mine was set to "Add www", and I changed it to "leave alone".

In addition, dreamhost offers https support. On control panel for the domain, it just says "On". However, it's a link, and if you click it you get the option to "Choose exact url". This was set to "https://www.mysite.com". I changed it to "https://mysite.com".

This combination of changes allowed me to log in to the board properly. So far, all the url combinations I have tried seem to be working the way I would expect.

Thanks for your help, and I hope this helps someone else.