MyBB Community Forums

Full Version: keep asking for admin password
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just install mybb, and I got a problem

I logged in as admin, and tried to view things on admin area ...
however, I keep having to login as admin, again & again


also, when I login to the submodule, such as
<mysite>/mybb/admin/index.php?module=config/settings&action=change&gid=11

I am immediately prompted to enter usr name + password ...
after logging in successfully, I'm redirected to
<mysite>/mybb/admin/index.php?module=config/settings
iinstead of the sub-module that I want ...


I read a few thread, some suggest it's cookie problem
I clean the cookie, and it still happening

can anyone help me ?

thanks a bunch !
You need to do more than just clear your cookies. Are you sure you've tried everything mentioned before?
http://community.mybboard.net/thread-35725.html
(2008-08-17, 07:58 AM)budisetiawan Wrote: [ -> ]I just install mybb, and I got a problem

I logged in as admin, and tried to view things on admin area ...
however, I keep having to login as admin, again & again


also, when I login to the submodule, such as
<mysite>/mybb/admin/index.php?module=config/settings&action=change&gid=11

I am immediately prompted to enter usr name + password ...
after logging in successfully, I'm redirected to
<mysite>/mybb/admin/index.php?module=config/settings
iinstead of the sub-module that I want ...


I read a few thread, some suggest it's cookie problem
I clean the cookie, and it still happening

can anyone help me ?

thanks a bunch !

It's not about clearing out your cache or the cookie. The reason you keep getting asked again and again is because the location that your cookie is being saved to is not being referenced correctly in your settings file.

The only way I was able to get out of this same issue was to modify the actual inc/settings.php file, even though the file warns against it. Unfortunately, it is impossible to edit the setting through the interface since you are constantly having to re-login.

Try this, and let me know if it works:

$settings['cookiedomain'] = ".yourdomain.com";
$settings['cookiepath'] = "../";
or
$settings['cookiepath'] = "/";

My particular config will not work unless the cookiepath appears as "../". Be sure you do not add the "www" or subdomain name in front of ".yourdomain.com".

Backup your current settings.php file, and then save the new version.

Steve
Yes, I have had the same problem and it's the cookie setting. As already described, edit the settings.php file. I set mine to:

$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/";

When you get in, go to the Configure section and also set it in there. It is recommended that you set cookiedomain to your own domain (excluding the leading www but leaving the dot in front) but I have found that sometimes MyBB sems to reset itself to null and I found just yesterday that leaving this field field entirely blank works just as well. There may well be a technical reason why the domain should be set rather than leaving it blank and maybe a MyBB expert can explain why. I'd also be interested to know why these settings appear to change themselves.
(2008-08-17, 08:43 AM)SteelD Wrote: [ -> ]Yes, I have had the same problem and it's the cookie setting. As already described, edit the settings.php file. I set mine to:

$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/";

When you get in, go to the Configure section and also set it in there. It is recommended that you set cookiedomain to your own domain (excluding the leading www but leaving the dot in front) but I have found that sometimes MyBB sems to reset itself to null and I found just yesterday that leaving this field field entirely blank works just as well. There may well be a technical reason why the domain should be set rather than leaving it blank and maybe a MyBB expert can explain why. I'd also be interested to know why these settings appear to change themselves.

Yes, I have also found that MyBB will "rewrite" over any manual changes I make in the settings.php file. It seems to do this whenever I go back into the Admin Control Panel and save any changes within the Control Panel that causes the settings.php file to be overwritten. I believe the rewrite happens because the settings.php become cached and any foreign file changes get overwritten with the "registered" and compliant settings.

That is a good tip to try leaving those two fields blank within the Admin Control Panel. I would be interested in seeing if others have the same luck with their configurations. This is also very helpful for people who are trying to create login pages outside of the /forums directory and are having the same cookie referencing problem.
I do find it a little worrying because I have had two working forums refuse to log me in because the cookie settings had changed without me consciously doing it. It's not the fact that it is over-written that bothers me so much as the fact that it sometimes appear to overwrite it with an invalid value and thus cause login problems.
(2008-08-17, 09:11 AM)SteelD Wrote: [ -> ]I do find it a little worrying because I have had two working forums refuse to log me in because the cookie settings had changed without me consciously doing it. It's not the fact that it is over-written that bothers me so much as the fact that it sometimes appear to overwrite it with an invalid value and thus cause login problems.

How frustrating! Just in between the time when I posted the solution, the same issue happened to me again! I couldn't get into my admin panel without a constant login box being present.

I took your advice, SteelID... But I first modified my own forums/inc/settings.php file (as stated above), and then when I was allowed in to my Admin Panel, I entered blank values for both cookie fields. So far, everything is working again... Now I will wait and see if MyBB overwrites it again... UGH!

Steve
(2008-08-17, 03:39 PM)sengratt1 Wrote: [ -> ]
(2008-08-17, 09:11 AM)SteelD Wrote: [ -> ]I do find it a little worrying because I have had two working forums refuse to log me in because the cookie settings had changed without me consciously doing it. It's not the fact that it is over-written that bothers me so much as the fact that it sometimes appear to overwrite it with an invalid value and thus cause login problems.

How frustrating! Just in between the time when I posted the solution, the same issue happened to me again! I couldn't get into my admin panel without a constant login box being present.

I took your advice, SteelID... But I first modified my own forums/inc/settings.php file (as stated above), and then when I was allowed in to my Admin Panel, I entered blank values for both cookie fields. So far, everything is working again... Now I will wait and see if MyBB overwrites it again... UGH!

Steve

MyBB doesn't have it's own mind - inc/settings.php is simply a cached file of what is in the database. If you update inc/settings.php then after you do that you need to update the settings in the ACP themselves which will update the database.

Ryan
I tried SteelD suggestion
$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/";

and it works ...

I want to make it non-domain specific, so I blank it out ...


thanks everyone for your help ...