Page 1 of 2

error "you are not logged as ....."

Posted: Fri Dec 23, 2016 1:31 am
by lylew
http://www.spamodeler.com/forum
using phpbb 3.0.x - can't get to ACP to get version.

I am an admin on this site. The other day, dotEasy asked us to remove a number of potential spammer accounts. I used the phpMyAdmin tool to do so and inadvertently deleted the Anonymous account. I know.

After much searching on this site and others, while finding nothing current, I tried some things that didn't work. Came across the need for the Anonymous account, re-created it and all was well for about two hours.

It then went back to not showing any topics/boards, etc. and displaying the "you are not logged...." error any time I and others try to log out. I can do nothing. I can't get to the ACP.

I did probably whack the sessions_keys table some how, but plan on recreating that in a bit.

I am out of guesses and am desperate to get our forum back online. Need some help, please.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 3:21 am
by Lumpy Burgertushie
you are apparently running 3.0.12
your cookie domain is wrong, it should be .spamodeler.com ( notice the dot in front )

you should not be removing things from the database unless you are certain about what you are doing. even removing the correct users will break things unless you remove all the different parts that relate to each user. most of the database tables are all interconnected and each user has data in several different tables.
there are methods built into the software to remove spammer accounts etc. from the admin panel.

if you removed or messed up the sessions table that could be the problem. the data in that table is not necessary but the table is.
If you need to redo the sessions tables;
using phpmyadmin, copy and paste this into the sql box for your database. be sure to change the table prefix if yours is not phpbb_

Code: Select all

# Table: 'phpbb_sessions'
DROP TABLE IF EXISTS `phpbb_sessions`;
CREATE TABLE phpbb_sessions (
	session_id char(32) DEFAULT '' NOT NULL,
	session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
	session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
	session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
	session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
	session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
	session_ip varchar(40) DEFAULT '' NOT NULL,
	session_browser varchar(150) DEFAULT '' NOT NULL,
	session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
	session_page varchar(255) DEFAULT '' NOT NULL,
	session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
	session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
	PRIMARY KEY (session_id),
	KEY session_time (session_time),
	KEY session_user_id (session_user_id),
	KEY session_fid (session_forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;


# Table: 'phpbb_sessions_keys'
DROP TABLE IF EXISTS `phpbb_sessions_keys`;
CREATE TABLE phpbb_sessions_keys (
	key_id char(32) DEFAULT '' NOT NULL,
	user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
	last_ip varchar(40) DEFAULT '' NOT NULL,
	last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
	PRIMARY KEY (key_id, user_id),
	KEY last_login (last_login)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 1:49 pm
by lylew
I made the changes at the request of the hosting entity. I fell into the trap of "they should know, right?". . .

How does one update the cookie domain?

I know one should not go mucking around in the db. I spent over 35 yeas in the IT world. However, it was already broken, dotEasy threw up their hands and our site was/is down. Had nothing much to loose.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 1:56 pm
by JimA
lylew wrote:How does one update the cookie domain?
Fixing incorrect cookie settings :)

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 2:21 pm
by lylew
Jim, I saw that. I'm still new enough at this side of programming that it gives me the willies. I created the file in Notepad, uploaded it using phpMyAdmin File Manager Upload and then renamed it to get the .txt extension removed. When I try to go to the link in a browser, I get errors.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 2:33 pm
by lylew
Id10t error on above. I have a good php file, but there are errors showing in the code from the KB at line 40. Looks ok to me.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 2:55 pm
by RMcGirr83
lylew wrote:I created the file in Notepad..
You shouldn't use windows notepad to create PHP files but rather a strict text editor like Notepad++.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 4:43 pm
by lylew
downloaded notepad++...same issues. there were some odd hidden characters in the leading spaces of the lines that had them. I removed those the got it to work. Changed the cookie domain to .spamodeler.com

and is still won't work. what else?

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 4:48 pm
by Noxwizard
You have secure cookies enabled, which is only meant for sites operating completely under HTTPS. You need to disable that.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 4:55 pm
by lylew
Okay. did that. Still doesn't work.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 5:16 pm
by Noxwizard
Your cookies are working, but logged out users are showing as partially logged in.
lylew wrote:Came across the need for the Anonymous account, re-created it and all was well for about two hours.
How did you re-create the account?

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 5:19 pm
by lylew
Noxwizard wrote:Your cookies are working, but logged out users are showing as partially logged in.
lylew wrote:Came across the need for the Anonymous account, re-created it and all was well for about two hours.
How did you re-create the account?
The first attempt was simply copying mine and renaming it. The I pretty quickly thought better of it and found a code script on this site to re-create it.

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 8:39 pm
by lylew
...and how do you deal with partially logged in users?

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 9:17 pm
by Lumpy Burgertushie
what is a "partially logged in user"?

that is not possible, you are either logged in or you are not.


robert

Re: error "you are not logged as ....."

Posted: Fri Dec 23, 2016 9:25 pm
by lylew
Lumpy Burgertushie wrote:what is a "partially logged in user"?

that is not possible, you are either logged in or you are not.

robert
I don't know. That is what is suggested a couple of posts above.