OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Login not working, even after reset dialog...

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Login not working, even after reset dialog...

Postby wallygva » Fri Feb 07, 2014 12:24 pm

This has me stumped.

I moved my OJS 2.4.3 install from a Mac OSX 10.8 box to a RHEL 6.x machine. Everything is now working well save one thing...the ability to log in!

I enter my username & password (as it was stored in the database that i export and then imported on the new server). Using sha1 hashing on both systems.

When login fails, I say "forgot my password"...i get an email....i click link....i get new email....i use that password and the system goes into "change your password now" dialog. The new password I type gets accepted but then it won't let me log in with it.

I check the database and see that a new hash is stored in the password field of "users" for my username so some portion of the reset process is working...

To eliminate server-migration issues, I created a new user via the OJS interface on the RedHat machine and gave that user a password. I see the new values in the user table in my MySQL database but that new user can't log in either.

At wit's end since this is the last kink I appear to have left in this migration (finding out I had to issue a "sesetbool -P httpd_can_sendmail 1" command to get mail working (so I could get the password reset emails working took much longer than it should have)...
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: Login not working, even after reset dialog...

Postby asmecher » Fri Feb 07, 2014 12:57 pm

Hi wallygva,

I wonder if you're using an unusual session hash algorithm; this is not the same as the password hash, and is typically configured in your PHP configuration. See session.hash_function in http://ca2.php.net/session.configuration. If the session algorithm generates IDs that are too long for the session_id column in the sessions table (typically 40 characters), you'll see the kind of behavior you describe.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8676
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login not working, even after reset dialog...

Postby wallygva » Fri Feb 07, 2014 7:39 pm

Thanks for the idea...I keep testing but thus far it seems that the session ID being generated on this "can't log in" system is within the varchar(40) range. I'll continue trying to get to the bottom of this, but the session.config values in my new RHEL host aren't different from those on the Mac OSX version that worked well. Will post back here if I figure it out.
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: Login not working, even after reset dialog...

Postby wallygva » Mon Feb 10, 2014 7:08 am

Did a fresh, clean, empty installation on the RHEL server. Login works just fine. Make settings in config.inc.php in my non-working install match those in the working install...still can't log in. Sequence to get a new password works fine...but I can't log in once I complete the "change your password now from the one OJS just sent you" dialog.
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: Login not working, even after reset dialog...

Postby wallygva » Mon Feb 10, 2014 7:17 am

I stop apache...delete everything in the sessions table. I restart apache, point a new (unused today) browser at my site. Go through the login dialog once. I see this in the sessions table (looks like

| u0tvqilnpbnq12co764ak47pr2 | NULL | 129.174.55.237 | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.70 Safari/537.36 | 1392041581 | 1392041581 | 0 | |
| c71p3m9og1504mi9vjuq1pu120 | 1 | 129.174.55.237 | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.70 Safari/537.36 | 1392041581 | 1392041581 | 0 | userId|s:1:"1";username|s:6:"wallyg"; |
| cmr9niumigtbnaf1l67dgjje12 | NULL | 129.174.55.237 | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.70 Safari/537.36 | 1392041581 | 1392041581 | 0 | |
| 06ro6v7lf6febaiquaj8rdu9a4 | NULL | 129.174.55.237 | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.70 Safari/537.36 | 1392041573 | 1392041573 | 0 |

That 2nd entry seems like a successful login but then immediately it creates a new session and has a NULL user.
The session ID's are all the same length (26 characters) even though they might not look like that in this post.
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: Login not working, even after reset dialog...

Postby wallygva » Mon Feb 10, 2014 10:51 am

Problem solved.

A small (but significant, I guess) bit of corruption in the MySQL database mean the mysqldump that I used to move between servers *was not* producing a clean file. Once I ran myisamchk across the original and ran the -recover switch...then the next dump/import yielded a system where login is working again!
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests