1

I've completed installation without error messages, but when I visit the site and attempt to log in, I can't, and I don't receive e-mails sent to reset the password.

Here are the details:

Using XAMPP 5.6.3 under Windows 7. Installing Drupal 7.36.

  • Site URL: localhost/Drupal7 (entered for "Site name" on "Installing Drupal" page of installation script)
  • Database user name: d7db_010_drupal7
  • Database name: (same as database user name)
  • Site user name: D7_010_Drupal7 (entered for "Site maintenance account Username" on "Installing Drupal" page of installation script)
  • Site e-mail address: D7LocAdmin@mydomain.com (not the actual domain) Passwords for two above user names: 10-char pws generated by www.passwordsgenerator.net

Database d7db_010_drupal7:

- Table users has two records:
    * User ID 0: All other fields either empty, null, or 0
    * User ID 1: name = D7_010_Drupal7, pw = hash, mail and init both = D7LocAdmin@mydomain.com, created = 1428953185, login = 1428953512 (See note on timestamps below.)
- Table users_roles has one record: User ID = 1, Role ID = 3
- Table watchdog has 55 records, mostly about installing and enabling modules, and:
    * Event ID 52: uid = 1, type = user, msg = Session opened for %name., location = http://localhost/Drupal7/user, timestamp = 1428953513
    * Event ID 53: uid = 0, type = access denied, msg = user/1, location = http://localhost/Drupal7/user/1, timestamp = 1428953513
    * Event ID 54: uid = 0, type = user, msg = Password reset instructions mailed to %name at %email., location = http://localhost/Drupal7/user/password, timestamp = 1428953546
    * Event ID 55: uid = 0, type = user, msg = Password reset instructions mailed to %name at %email., location = http://localhost/Drupal7/user/password, timestamp = 1428953571

Note that value of "login" for user 1 in the table "users" is one second before the timestamp of events 52 and 53.

Actions I took when installation completed:

  • Went to localhost/Drupal7. Prototype page came up.
  • Entered site user name and its password. Nothing happened. No event for this in table "watchdog".
  • Clicked on link for "Request new password". In form that came up, clicked on "Log in" tab. Entered site user name and its password. Result: "Access denied". This is event 53
  • Clicked on "Request new password" tab. Entered "D7_010_Drupal7" and clicked button. Result: "Further instructions have been sent to your e-mail address." This is event 54. No e-mail received.
  • Clicked on "Request new password" tab. Entered "D7LocAdmin@mydomain.com" and clicked button. Result: "Further instructions have been sent to your e-mail address." This is event 55. No e-mail received.

I sent myself an e-mail at the site e-mail address to test that it's working and I received it.

Can someone see:

(a) Why I can't log in

(b) Why I'm not receiving the e-mails

or tell me what to inspect or test further to find out?

Thank you.

===============================

Update

In order to check that the problem is not with characters in the user name or with using the wrong password, I reset the name and password to "hello" and "there". I did the following:

  • Ran php on "scripts\password-hash.sh there"

The response was

password: there hash: $S$DK0K/McRjrM9f7D/OwExsr8Fk.8uaU1U4CC030GbqjAArbEMIFg/

  • Ran the following two queries on table "d7db_010_drupal7":

UPDATE users SET name = 'hello' WHERE uid = 1;

UPDATE users SET pass = '$S$DK0K/McRjrM9f7D/OwExsr8Fk.8uaU1U4CC030GbqjAArbEMIFg/' WHERE uid = 1;

  • Entered "hello" and "there" on the login on the main page. Again, nothing happened.

  • Went to "localhost/Drupal7/user" and entered "hello" and "there". Result: Access denied.

  • Repeated the last step above in case of mistyping. Result again: Access denied.

Grrr!

  • It happens to me once, try clearing the cache of the browser or use another browser. – Alyssa Gono Apr 14 '15 at 2:24
1

Thank you to Alyssa Gono for solving this. She did it in a comment, so I can't formally credit her with the correct answer. But I'll lay out here what happened.

I thought at first that couldn't be it. How could a cookie be interfering with the analysis of the login credentials? But I was so frustrated by this problem that I decided to give it a try. I work in Firefox, so first I loaded IE, and logged in there, and it worked! Then I went back to Firefox and looked at my cookies. Rather than deleting them all, I looked for cookies from localhost. There were about 20 of them. I deleted those and bam! I was able to log in!

This was with the credentials "hello" and "there" set in the update above. So next I undid the changes described in that update by resetting the credentials back to the intended ones. Went back to the site, logged out and logged back in with those credentials and Wow! Problem solved.

Now I can finally get to work on developing my sites.

I'm going to submit a bug report at Drupal because it would be helpful if the sw could let the user know that a cookie is blocking the login. If it can't detect that, at least it would be helpful to suggest clearing cookies if one believes the login should be working and isn't.

Can someone explain how it is that a cookie interferes with the analysis of the login credentials?

Thank you again to Alyssa.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.