Firefox PHP

Can't log-in to Phorum Admin

Posted by dlc3172 
Re: Can't log-in to Phorum Admin
February 12, 2008 12:48PM
I just setup the latest 5.1 with the embed_phorum module (stub_example connector).
This one is working just fine. I am automatically logged in as the admin user as the front page. On the admin page, I have to login. If I login, I immediately go to the admin start page. My session ids look just like yours (embed_1_......) and I am pretty sure that I wrote things in such way that those different looking ids would work with the admin authentication too.

Can you try putting the password string from the original admin user record on your test forum back in the password field for the admin user and see if that helps?

What are your settings below "Cookie/Session Settings" under "General Settings" ? Especially: did you setup a Session Path?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 12, 2008 01:18PM
Trying the admin password from the test forum didn't work.

the setting for Cookie/Session for the test forum are:
Main Session Timeout: 30 days
Session path: /
Session domain:
Track User usage: Once per day

For the original forum (looked it up in the database since I can't access the original admin):
session_timeout: 30
short_session_timeout: 60
session_path: /
session_domain:
track_user_activity: 86400


Quote
mmakaay
I just setup the latest 5.1 with the embed_phorum module (stub_example connector).
This one is working just fine. I am automatically logged in as the admin user as the front page. On the admin page, I have to login. If I login, I immediately go to the admin start page. My session ids look just like yours (embed_1_......) and I am pretty sure that I wrote things in such way that those different looking ids would work with the admin authentication too.

Can you try putting the password string from the original admin user record on your test forum back in the password field for the admin user and see if that helps?

What are your settings below "Cookie/Session Settings" under "General Settings" ? Especially: did you setup a Session Path?
Re: Can't log-in to Phorum Admin
February 12, 2008 01:26PM
Well, I'm pretty much out of options. Maybe you could upgrade to the latest 5.1 release to rule out that this is some old bug or so that is bugging you. Even if it isn't, it is a good idea to do the upgrade. I saw in your admin.php URL that you're not running this most recent version.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 12, 2008 01:33PM
I just was able to login after deleting the user #1 (admin) and inserting the whole user row for the admin from the test forum

That way I got access to the admin panel, however once I accessed the community through drupal, the problems were set back. I could no longer login to admin.

I'm now changing the values of the fields in the database row for the admin to the same as in the test forum, field by field, I will let you now which one it is that seems to make problems.

Can I easily upgrade to a newer version?
Re: Can't log-in to Phorum Admin
February 12, 2008 01:44PM
Yes you can, unless you have been hacking the Phorum core files. Installing should be a matter of copying the new 5.1.x files over the old ones and after that running some database upgrades through admin.php if required (those would only be needed for bugfixes, since we do not change templates and db structure in a stable release).


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 12, 2008 01:50PM
Guys I found the problem

A coders nightmare, one of those things you don't look at and hardly ever find if it exists

An empty space in front of the User name

Admin was _Admin with _ being an empty space therefore the login didn't work

All other users have the same problem, most likely a problem in the file that synchronizes the drupal user table with the phorum user table. The Community of course works since authentication there is done through drupal not Phorum.

Look at my previous post where I gave you the Admin user row from my test and original installation and you will see it.

Thanks for all the help from now on I think I'll be able to fix it myself.

Everybody else with a similair problem, watch out for blank spaces ;)

Tino
Re: Can't log-in to Phorum Admin
February 12, 2008 03:00PM
Pfr, what a fun one.
I'm glad you found it. I totally overlooked it myself as well in your record dumps.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 23, 2011 09:14AM
Quote
Maurice Makaay
The only thing that is needed for an administrator is that the "admin" field in the database is set to "1". So check if that is the case. I wrote a little script once for recovering / setting the admin status for a user. You can edit that script, put it in the Phorum install directory and run it from your browser (especially useful if you don't have a good database access to check the admin field yourself). The script can be downloaded from here: [secretsauce.phorum.org] (make sure to rename it to rescue_admin.php).

Same here.
I've managed to change the name of the admin + remove admin status.
When I enter my username and password, the page just reloads.

I've already found a "changeusername" script here to restore the username to "admin".

I can't open your script:
[secretsauce.phorum.org]
500 server error

Is there any other way to get it?
Re: Can't log-in to Phorum Admin
February 23, 2011 09:38AM
Try again. This error originated from a server configuration issue. I fixed the config and the file is now readable.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 23, 2011 09:39AM
Working now!
Thank you very much!!!
Re: Can't log-in to Phorum Admin
February 23, 2011 10:08AM
Hmm, I'm getting an error message:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in *** on line 13

I've just changed "mauricem" to "admin".
Do I have to do more changes here?
Re: Can't log-in to Phorum Admin
February 23, 2011 10:13AM
That means that phorum_db_mysql_connect() is not returning a database connection, which it really should. It the Phorum site working at all?

When it's just this script that isn't working, you could also try to access your database using a tool like PHPMyAdmin (when provided to you by your hosting provider) to check and possibly update the "admin" field for your admin user.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 1 time(s). Last edit at 02/23/2011 10:14AM by Maurice Makaay.
Re: Can't log-in to Phorum Admin
February 23, 2011 10:25AM
Phorum is still working fine.

I've already found the "0" I have to change into "1" using phpmyadmin.
But I just don't know how to change it - never used phpmyadmin bevore....
Re: Can't log-in to Phorum Admin
February 23, 2011 10:43AM
I don't use it myself either, but you should at least be able to run a query like UPDATE phorum_users SET admin=1 WHERE username='admin'
"phorum_users" depends on your database prefix for Phorum of course.

I suspect that PhpMyAdmin will have a feature for updating record contents directly too, but I don't know the specifics for that.

Apparently googling for "PhpMyAdmin edit record" helps: tutorial


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can't log-in to Phorum Admin
February 23, 2011 11:46AM
OK, got it.
It's was very easy using phpmyadmin.
Just log in, select "phorum_users", select "browse" tab, use the edit icon at the user you want to chance and change "0" to "1" at "admin".

Thanks again!
Re: Can't log-in to Phorum Admin
October 09, 2013 02:10PM
My client's forum was being spammed on a daily basis. I accidentally deleted my e-mail address along with all the spam ones, and now I can no longer access the Admin page. I tried the Rescue-Admin script - it seemed to run OK, but I still can't get in to Admin. I tried clearing cookies, relaunching Firefox and changing the password.

HELP!!!
Re: Can't log-in to Phorum Admin
October 09, 2013 08:25PM
Did you create a new account first and modified the script to update the new user afterwards?


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Can't log-in to Phorum Admin
October 09, 2013 10:09PM
It's OK - I went into the database on my hosting site and changed the Admin parameter on my log-in from 0 to 1, and that fixed it. Thanks for your prompt response!
Sorry, only registered users may post in this forum.

Click here to login