I could not login to admin page after installation.

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

I could not login to admin page after installation.

Post by caiy »

I had no problem with installation, however I could not login to admin page after installation. I got "User or password not valid. (admin / *)" error. I have checked the data.php file and there is no problem with the password.
I am using:
php 5.2.11
PMF 2.5.4
mysql: 5.1.41
apache: 2.2.14
Thank you in advance for any advice.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

is there any data in the tables of the database?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

Hey, thanks a lot for replying.
Yes, there are data in dbtables: faqconfig, faqstopwords,faqsessions, faquser,faquserdata, faquserlogin.
Also, I am trying to install this on my WindowsXP desktop, not a Windows server. I don't have SMTP setup. When I try Password forgotten link, I got "Error:Username and e-mail address not found" message.
Goes to the faq index page and register a user. Got the following message: "phpMyFAQ warning [2]: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in Builtin.php on line 74" and "phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at C:\public_html\myfaq\inc\functions.php:169) in register.php on line 122".
The user information is saved to user, userdata and userlogin tables.
caiy
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

you have to configure your mail configuration in your php.ini file for mail support.

Are you sure you entered the correct password?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

Yes, I am sure. To make sure I used the right password, I performed reinstall twice.
I saw previous post regarding admin login issue. Just wonder if the previous problem had be resolved.
viewtopic.php?f=8&t=6983&p=22954&hilit= ... in+#p22954
viewtopic.php?p=21632#21632
I have:
Register Globals
off
Safe Mode
off
Open Basedir
no value
session.auto_start = 0

Thanks.
caiy
Last edited by caiy on Tue Dec 01, 2009 9:25 pm, edited 1 time in total.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

please tell me if the tables faqright and faquser_right are also populated with data.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

No there two table were not populated with any data.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

strange...

Please run these both queries in a tool like phpMyAdmin:

Code: Select all

INSERT INTO `faqright` (`right_id`, `name`, `description`, `for_users`, `for_groups`) VALUES
(1, 'adduser', 'Right to add user accounts', 1, 1),
(2, 'edituser', 'Right to edit user accounts', 1, 1),
(3, 'deluser', 'Right to delete user accounts', 1, 1),
(4, 'addbt', 'Right to add faq entries', 1, 1),
(5, 'editbt', 'Right to edit faq entries', 1, 1),
(6, 'delbt', 'Right to delete faq entries', 1, 1),
(7, 'viewlog', 'Right to view logfiles', 1, 1),
(8, 'adminlog', 'Right to view admin log', 1, 1),
(9, 'delcomment', 'Right to delete comments', 1, 1),
(10, 'addnews', 'Right to add news', 1, 1),
(11, 'editnews', 'Right to edit news', 1, 1),
(12, 'delnews', 'Right to delete news', 1, 1),
(13, 'addcateg', 'Right to add categories', 1, 1),
(14, 'editcateg', 'Right to edit categories', 1, 1),
(15, 'delcateg', 'Right to delete categories', 1, 1),
(16, 'passwd', 'Right to change passwords', 1, 1),
(17, 'editconfig', 'Right to edit configuration', 1, 1),
(18, 'addatt', 'Right to add attachments', 1, 1),
(19, 'delatt', 'Right to delete attachments', 1, 1),
(20, 'backup', 'Right to save backups', 1, 1),
(21, 'restore', 'Right to load backups', 1, 1),
(22, 'delquestion', 'Right to delete questions', 1, 1),
(23, 'addglossary', 'Right to add glossary entries', 1, 1),
(24, 'editglossary', 'Right to edit glossary entries', 1, 1),
(25, 'delglossary', 'Right to delete glossary entries', 1, 1),
(26, 'changebtrevs', 'Right to edit revisions', 1, 1),
(27, 'addgroup', 'Right to add group accounts', 1, 1),
(28, 'editgroup', 'Right to edit group accounts', 1, 1),
(29, 'delgroup', 'Right to delete group accounts', 1, 1),
(30, 'addtranslation', 'Right to add translation', 1, 1),
(31, 'edittranslation', 'Right to edit translations', 1, 1),
(32, 'deltranslation', 'Right to delete translations', 1, 1),
(33, 'approverec', 'Right to approve records', 1, 1);

INSERT INTO `faquser_right` (`user_id`, `right_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(1, 5),
(1, 6),
(1, 7),
(1, 8),
(1, 9),
(1, 10),
(1, 11),
(1, 12),
(1, 13),
(1, 14),
(1, 15),
(1, 16),
(1, 17),
(1, 18),
(1, 19),
(1, 20),
(1, 21),
(1, 22),
(1, 23),
(1, 24),
(1, 25),
(1, 26),
(1, 27),
(1, 28),
(1, 29),
(1, 30),
(1, 31),
(1, 32),
(1, 33);
This should fix your issues.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

Thorsten,

Thank you very much for your patient.
I run the query and populated the two right tables. But this did not fix my problem. I even restarted my computer to make sure I have refreshed everything. I am sorry. :(

caiy
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

hm....

Could please enable the DEBUG MODE in inc/Init.php and tell me if you see any errors?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

Ok, I will try.
Anyway, in my faquser table, the account_status for all users (with id 1,2,3) is "blocked". Not sure if this contribute to the problem. Just letting you know.
Thanks.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

ah.... why do you have blocked here? It's "protected". :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

At the bottom of admin login page displays something like:
----------------------------------------------------------------------
DEBUG INFORMATION:
C:\public_html\myfaq\inc\Init.php:
PMF_Configuration->getAll() in line 95:

SELECT
config_name, config_value
FROM
faqconfig

C:\public_html\myfaq\inc\PMF_User\CurrentUser.php:
PMF_Auth_AuthDb->checkLogin() in line 146:

SELECT
login
FROM
faquserlogin
WHERE
login = 'admin'
--------------------------------------------------------------------
However, I don't have such user in faquerlogin table with login = 'admin'. I don't think the installer has insert any admin login into the database. Should everything be in that data.php file?
Is there a way to manually insert an entry to the faquserlogin page with login="admin"? I don't know how to setup the pass.
Thanks a lot.

caiy
caiy
Posts: 12
Joined: Mon Nov 30, 2009 11:24 pm

Re: I could not login to admin page after installation.

Post by caiy »

I have no clue why I have them as "blocked". I guessed because admin has not prove the registered user yet. These are registered users, not admin users.
user with id=1 in faquers should be the "admin"?
Last edited by caiy on Tue Dec 01, 2009 10:19 pm, edited 1 time in total.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: I could not login to admin page after installation.

Post by Thorsten »

Hi,

the installer only creates one account with the login name "admin". Could you please send me your package of phpMyFAQ by e-mail?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply