Topic: I can't stay logged in to my forum

I have just run the PunBB Migration Tool to take my site away from PHBB.

I'd like to explain, in stages, what problems I've had, what I did to try to fix them, and where I'm at now:

1.  After conversion, all looked fine - all users and posts were brought over.

2. When logged in as Site Admin, I tried to go to the "Administration" area but was denied access and automatically logged out.

3. I went into PHPMyadmin and changed the group_id for the Site Admin user to "1" (it was set to "4").

4. I logged into the forum as Site Admin again, and everything seemed fine. I was able to do administration and also to use the forum as a user (I also logged in as a normal user).

5. I have been modifying the CSS and main.tpl files All I have done is enclose the forum in a container div which sits in my site layout.  Since doing this, I have a login/logout problem.  I can login, but as soon as I go to any page within the forum, I am automatically logged out. This is the case for a normal user login and also a Site Admin login.

So, that is where I am at - unable to stay logged in and unable to do any administration.  I have just checked the database, and the Site Admin user group_id is still set to "1".  Also, I have tried reverting to the original CSS and main.tpl files but I have the same problem with these.

I've just noticed that the tool is for PunBB 1.2.1, whereas I went to 1.2.5 - does anyone know if that might be the root of my problem?

2

Re: I can't stay logged in to my forum

What I can tell you for sure is that this problem has nothing to do with the css and main.tpl. It's most likely a cookie problem. Have you checked your cache to see if the cookie is being created when you login?  Have you tried clearing your cookie cache? Is the forums domain the same as the cookie domain in your config file.

Re: I can't stay logged in to my forum

Yes, I was 99% certain that it wsa nothing to do with the css or tpl files, but you never know, so I just thought I'd try going back to the original set-up.

Do you mean the cache on my computer, or the php files in the cache drectory of the forum?

I think you mean on the computer. Will check this and the config file, thanks.  I tried clearing out the cache php files from the forum but this had no effect.

Re: I can't stay logged in to my forum

OK, so now I am confused.......  I have just been back to my forum and now I can log in as different users, do admin, do basically anything that I couldn't do last night..... huh?

Well I just hope it stays this way.

I kept cleaning my local cache last night as I thought it was something to do with cookies, but it had no effect. Today,  having done nothing differently, all appears to be well.

I checked my cookies and they are being written as expected.

Any ideas what has been going on?

Re: I can't stay logged in to my forum

Cookie problems are difficult to debug. It could have been a collision with an older cookie or something like that. If you do run into the problem again, I suggest you delete all cookies related to the website in question and then restart your browser.

"Programming is like sex: one mistake and you have to support it for the rest of your life."