When logging into a Drupal instance (Drupal 7.22) I've set up, I keep getting a invalid username/password error. I've tried changing passwords and other users to no avail.
What's especially odd is that I'm able to log in to the same Drupal instance when it's running on other servers (it connects to a remote database). The two computers I've been able to log in successfully have both been Linux machines, vs. the one that doesn't work (OS X running MAMP). The code base is also the same.
I did some debugging and found that the hash that's created on login to verify isn't the same as the one stored in the database. I got down to the _password_itoa64
method in password.inc
, and gave up trying to debug the individual character matches.
Has anyone encountered anything similar, or have any idea why the hashes would be different?
Reason is in different PHP versions. Older versions (5.2 or 5.3 AFAIK) had week hash algorithm in "crypt" module, later it was updated.