Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: (Solved) Login issues  (Read 1222 times)

alks

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 53
(Solved) Login issues
« on: September 04, 2010, 01:16:54 PM »

I'm having a few issues with login when testing on my live server. Uploaded snews website and it works fine until you decide to change your admin password and user name. When i do this i can nolonger log in at all. So dropped the tables using phpmyadmin and used the defualt tables to reset back to admin / admin. Again everything works fine until i decided to change the password - then i can not log in. I have repeated this process 3 times and the same result. On two of the occasions i got a 500 internal server error message. i cannot leave the default to admin/admin on a live server so need to change the password.

This error only occurs when i try to change the admin user password and name.

Any ideas?

alks
« Last Edit: September 04, 2010, 10:04:20 PM by Keyrocks »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: (Solved) Login issues
« Reply #1 on: September 04, 2010, 05:05:13 PM »

No... this is not happening to me

You didn't note which version of 1.6 MU you are using.
I'll assume you are using Bob Baker's 1.6.3 MU package.

1.  Access database with phpMyAdmin.
2.  Click the "users" table in the left side-bar.
3.  In the main panel, click the pencil icon for the admin account, it should be id = 1.
4.  Replace the username and password values with - 21232f297a57a5a743894a0e4a801fc3
     This is the default md5 hash string for admin.
5.  Save the change to the users table.
6.  Keep phpMyAdmin available in a browser tab to check later.

Go back to your login page and you should be able to log in with admin | admin.
You can refresh the username and password in the table this way any time without affecting the rest of the database.

When you change the password and save the change, go back to your phpMyAdmin panel and refresh the users table.
You want to see if the hash strings for username and password are still the same as the ones you just pasted in.
If they are the same, then your change did not UPDATE the users table as it should.
If they did, then we know it was updated.
« Last Edit: September 04, 2010, 10:04:44 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

alks

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 53
Re: (Solved) Login issues
« Reply #2 on: September 04, 2010, 06:23:53 PM »

thanks keyrocks - i did the test and found I had made an error so silly that if i were to tell you what it was you would be in hysterics for the rest of the day. Funny i spent hours investigating it and in the end it was the most simple of things. Sometimes you just cant see the wood for the trees.  :-X

it doesnt however expain the internal server error message but it appears not to have returned yet

Out of interest is it possible to change the admin user name from within the profile area? or does the main admin user have to called admin? I could of couse change it in the database but i cant see an option on the admin profile page.

thanks greatly,

alks
« Last Edit: September 04, 2010, 10:05:02 PM by Keyrocks »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: (Solved) Login issues
« Reply #3 on: September 04, 2010, 10:41:36 PM »

Note: I tagged the first three posts in this thread as (Solved) since you seemed to have solved the problem.  8)

1)  thanks keyrocks - i did the test and found I had made an error so silly that if i were to tell you what it was you would be in hysterics for the rest of the day.
     Funny i spent hours investigating it and in the end it was the most simple of things. Sometimes you just cant see the wood for the trees.  :-X

2)  it doesnt however expain the internal server error message but it appears not to have returned yet

3)  Out of interest is it possible to change the admin user name from within the profile area?
     or does the main admin user have to called admin? I could of couse change it in the database but i cant see an option on the admin profile page.

1)  No problem... we all make bo-bos that we wouldn't share with anyone. Chalk it up to experience... a learning event you likely won't repeat.  ;D

2)  You'd be surprised how the smallest little syntax error can cause server errors.
     I've found PHP to be a very flexible programming language but... wherever a syntax error occurs in a file, that's where PHP stops parsing the file.
     If this happens in a large file like snews.php, then all sorts of errors can occur when the rest of the functions following the error cannot be parsed.

3)  Is it possible to change the admin user name from within the profile area?

By default, the username has not been editable fron the Profile panel... only because the case 'profile': section within function processing() is not written to retrieve the username and show it in a field in the form... or save the username to the users table in the database when saving a Profile edit.

That said, it would not be too much work to modify that section to retrieve the username, show it in an editable field, and save the change (along with any others) to the users table in the database.

Now... would the admin account's functionality be adversly affected if the username was no longer admin?
I don't think so... though I have not not explored this before or deleted the default admin account... to find out.

When creating a new account, you can assign Admin Level access to it, make it a Site Owner and give it full privileges.
Admin Level access means it gets tagged with level value of '1' when saved to the users table in the database... the same level assigned to the default admin account.
Any account with level 1 will have the same access regardless of what the username is.
« Last Edit: September 04, 2010, 10:45:09 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU