MyBB Community Forums

Full Version: Have to log in again and again and again .... (ad nauseam)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm currently evaluating MyBB for a site I administer. I have installed a copy of MyBB on my home machine (Mac OSX) to give it a spin.
Installation was smooth and straightforward, all the requirements were met on my system. However, my initial favourable impression has been dampened somewhat by the following problem:
I can log in to the admin account that was created during installation, but with every link or button I click I get another log in dialog. Also, any attempt at changing settings is followed by a fresh log-in, and the settings are not saved (after I dutifully log in for the umpteenth time).
As per the instructions of this page: http://wiki.mybboard.net/index.php/Help:Cannot_login
I tried correcting the cookie settings, apparently the values I supplied during installation were incorrect, but the new settings couldn't be saved (after logging in once more). I then tracked down the settings file (/inc/settings.php), and edited the cookie values directly in that file.
That didn't solve the problem, the old values continue to be displayed in the admin page. I chmodded the entire myBB tree 777 to make sure this isn't a permissions issue and tried different browsers to make sure it isn't browser related.

I've tried searching the forums for a similar issue without success.
This is my last attempt at resolving the issue, before I scrap all the myBB files and move on to the next candidate for forum software.
Yes when you edit ./inc/settings.php you must edit the settings again in the ACP. Editing settings.php doesn't update the settings that show in the ACP, which is why it was showing the old settings.
OK, thanks for the speedy reply!
That means I can't correct this issue, since I can't save any settings.
Should I reinstall?
You need to change your cookie settings in inc/settings.php first, so that you can gain access to the Admin CP. Once you are able to login to the Admin CP and navigate without being logged out, then you can update the Admin CP --> Configuration --> Settings cookie settings. That way it will be stored in the database.
(2008-10-28, 10:16 PM)DennisTT Wrote: [ -> ]You need to change your cookie settings in inc/settings.php first, so that you can gain access to the Admin CP. Once you are able to login to the Admin CP and navigate without being logged out, then you can update the Admin CP --> Configuration --> Settings cookie settings. That way it will be stored in the database.

What he said Toungue

Basically, the cookie settings are drawn from the file, settings.php. When you edit that, the forum will work but as the settings page entries aren't directly drawn from the settings page (they're shown from a cache aren't they??) they don't show the new settings. You have to edit the settings in the ACP to tell the database that you've made the changes. You will technically be able to use the forum without editing the ACP settings but then as soon as you save anything, the old settings will come back and you'll be back to square one.
(2008-10-28, 10:16 PM)DennisTT Wrote: [ -> ]You need to change your cookie settings in inc/settings.php first, so that you can gain access to the Admin CP. Once you are able to login to the Admin CP and navigate without being logged out, then you can update the Admin CP --> Configuration --> Settings cookie settings. That way it will be stored in the database.

I edited settings.php as you said, and tried saving them in the ACP as well, but that's the part that doesn't work (still).
Next I edited the value of the cookies settings in the db table and tried again, same result.
Then I re-installed everything from fresh, repeated the installation, could log in successfully as the admin.
But whatever other action I take from there is greeted by another log-in dialog.

I think I'm giving up.

Thanks for the help though.
(2008-10-28, 10:37 PM)Matt_ Wrote: [ -> ]
(2008-10-28, 10:16 PM)DennisTT Wrote: [ -> ]You need to change your cookie settings in inc/settings.php first, so that you can gain access to the Admin CP. Once you are able to login to the Admin CP and navigate without being logged out, then you can update the Admin CP --> Configuration --> Settings cookie settings. That way it will be stored in the database.

What he said Toungue

Basically, the cookie settings are drawn from the file, settings.php. When you edit that, the forum will work but as the settings page entries aren't directly drawn from the settings page (they're shown from a cache aren't they??) they don't show the new settings. You have to edit the settings in the ACP to tell the database that you've made the changes. You will technically be able to use the forum without editing the ACP settings but then as soon as you save anything, the old settings will come back and you'll be back to square one.

Needless to say I tried all the above a number of times, restarting browsers inbetween etc.
One thing I forgot to do until now: restarting apache, didn't help either.
What are you trying to set the cookie settings to?
since the url is: http:localhost/audite/an_bb/
these were the settings for domain and path respectively:
.localhost
/audite/an_bb/
I verified this with the script here:
http://www.dennistt.net/mybb/cookiesettings.php
Those settings look about right. That's pretty much what I use when I set one up on localhost. You could try just using the / as the path. It's worth a shot. I usually leave it as that so I could access the cookie outside of the forum. For a login form on my main site for example.

What web server are you using? If it's Apache, there may be a misconfiguration. If it's another server, I can't help you.
Please set the following cookie settings:

Cookie domain - leave this blank
Cookie path: /audite/an_bb/

Edit this in inc/settings.php if you have to, then clear your cookies. Login to your Admin CP, and change the ACP setting to the above to save it permanently in the database.
Pages: 1 2