Suddenly can't login on my site as admin and also another user no matter what I do. 2 other persons can still login.

I have used the whole day to search Google and done what people suggest but nothing helps. I have deleted history, cache, temporary files and deleted sessions from sessionstable. Tried 3 different browsers. Any one know what to do next, please?

The only thing I did as I remember from when the site was functioning was uploading an image to the site from my Android using the same site as I use online and deleted this image again but don't think this could have made any problems/changes or?

Comments

drupso’s picture

There are some tips that you can check before :

  1. What happen when you try to login with admin ? Any system warning / message ?
  2. Do you have access to your database (via phpmyadmin p.e) ?
  3. Is there admin user in users table? Which status has (0 or 1)?
    Inspect flood table cause maybe your admin user can be blocked (as you can see in this article http://geroldm.com/2011/10/drupal-sorry-there-have-been-more-than-5-fail...)
  4. Maybe you find an answer in your server logs.

I think that I'll need more information for help you and find what is wrong.
Regards

tinem’s picture

Thanks for trying to help and so quick. It's a Drupal 6 site.

1. What happen when you try to login with admin ? Any system warning / message ?
Sorry, unrecognized username or password. Have you forgotten your password?


2. Do you have access to your database (via phpmyadmin p.e) ?

Yes

3. Is there admin user in users table? Which status has (0 or 1)?
Inspect flood table cause maybe your admin user can be blocked (as you can see in this article http://geroldm.com/2011/10/drupal-sorry-there-have-been-more-than-5-fail...)

uid 0 - No one
uid 1 - admin
No fload table because it's Drupal 6

4. Maybe you find an answer in your server logs.
I'm on a shared host and don't know where server logs is and as I can't login as admin I can't see what is in Reports.

VM’s picture

UID 0 - should be the anon user

clear the sessions table in the database
clear the browsers cookies

test

drupso’s picture

I don't work with D6, I'm working with 7 but check if exists in that environtment:

  • Exist Field status in users table? If so, which value has for admin record?
  • See watchdog table (In D7 version is where recent log messages are stored in database). Review last records
  • Seee user_roles table for admin user. Is there a record for this user?
  • Can you register users via web ? If so, you can set same password as you had with admin and check in table users if hashed password string are same

Regards

tinem’s picture

@drupso: Exist Field status in users table? If so, which value has for admin record?
status = 1

See watchdog table (In D7 version is where recent log messages are stored in database). Review last records
I don't understand the format "timestamp" so can't tell which is the latest?

Seee user_roles table for admin user. Is there a record for this user?
uid =1
rid = 3

Can you register users via web ? If so, you can set same password as you had with admin and check in table users if hashed password string are same
How should this be possible when I can't login as admin.
Edited 13 April 13:10 I tried this on an almost copy of the site and password looked the same when hashed. But what can I use this for, please?

@cfox612: What happens when you try to request a new password?
Haven't tried this yet because I really need to understand what has happened because when my site is finished there will be 98 different users with login/password and in each of them 4-5 people to update this info so NOT good if I should tell all that they now need to use another password. But at the moment as I told in the start there are only 4 users.
Edited 14 April 11:01 "UID 0 - should be the anon user" What does anon user mean?

But could it have something to do with I used Android phone as mentioned in the start of my message?

cfox612’s picture

What happens when you try to request a new password?

tinem’s picture

Suddently another Drupal 6 site had the same problem. I'm about to go crazy and have used days now. Contacted my Host but they don't know. I can see hundred of other people has the same problem with Drupal and logins and that NOT good. Hope Drupal 7 and 8 will be better and that the core programmers at Drupal are aware of this, please.

I solved it. I used request a new password and just used the same again and it worked. But one of the users I hade to use PhpMyAdmin to login and change mailadress to give me acces to get a mail and make these changes and now this is also OK and I change the mailadress back to what it was before.

But I don't hope I shall have such problem when I go from 4 users to 98. :-(

Thanks for trying to help and please let me know if you have easier solutions to my problems, thanks.

AswathyAjish’s picture

I also have the same issue. I can't login with any users.

Following error is showing in log :

RuntimeException: Failed to start the session because headers have already been sent by "/opt/web/vendor/symfony/http-foundation/Response.php" at line 1224. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 152 of /opt/web/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)

I am using drupal 9.

I have tried all the solutions here, but no use. Any other solution to this?

VM’s picture

-=-

VM’s picture

a search for the error for D9 indicates the likelihood that it is related to a contrib module or Distro (Opingo LMS?).

Sushil Kumar Sharma’s picture

please try to upload new php.ini

don't upload few like this:-

memory_limit = 70M
post_max_size = 804M
file_uploads = On
upload_max_filesize = 200M
max_execution_time = 140

upload all php.ini files

it's work for me after upload new php.ini

rastin71’s picture

I'm running a D7 site, but this is likely still something that could effect D6.

Most of my users are anonymous and do not use any accounts. I have 1 page that is restricted to internal employees and used to stream video of odd events or our quarterly performance meetings. My instruction was to create a single, shared account for all these users.

Just today we had a big announcement and combined with recent headcount growth, had more concurrent users than at any other time. I started receiving emails that some users were being denied access, but knews others using the same account were being permitted. I logged out of my admin account, confirmed I could not log in using the shared account, then was unable to log in with my admin credentials. Panic!

After restarting Apache (a prayer to the system gods) I received a notice in my apache2 error.log that I had hit my MaxClients setting. Since hosting these events is a secondary function of my server I notified my internal uses to sit tight. Once the event ended and most of my connected users logged out I found I was able to get back into my admin account.

So this weekend I'll be looking at my Apache settings.

Hope this helps.

RaulMuroc’s picture

clear the sessions table in the database <-- worked like a charm.

Drupal Association individual member

hesco’s picture

On the web server:

# drush sqlq "DESCRIBE sessions;"                                                   
Query failed.  [error]

# drush sqlq "SELECT count(*) FROM sessions;"
Query failed.  [error]

Then on the database server, log in as root; . . .

mysql> REPAIR TABLE sessions;
+-------------------+--------+----------+-------------------------------------------------------+
| Table             | Op     | Msg_type | Msg_text                                              |
+-------------------+--------+----------+-------------------------------------------------------+
| ggp_cms6.sessions | repair | info     | Found block that points outside data file at 16322192 |
| ggp_cms6.sessions | repair | warning  | Number of rows changed from 111884 to 111868          |
| ggp_cms6.sessions | repair | status   | OK                                                    |
+-------------------+--------+----------+-------------------------------------------------------+
3 rows in set (4 min 36.00 sec)

mysql> SELECT count(*) FROM sessions;
+----------+
| count(*) |
+----------+
|   111875 |
+----------+
1 row in set (0.34 sec)

mysql> DELETE FROM sessions;
Query OK, 111875 rows affected (1.27 sec)

-- Hugh Esco

Eranga’s picture

Make sure whether the apache rewrite module is enable and working properly.

JOoxis’s picture

Yes, despite the .htaccess file being present with the require rewriting rules, apache mod_rewrite still has to be enabled on the server (if you are using apache).

jeromewiley’s picture

Explicitly, you have to issue the command:
sudo a2enmod rewrite

Then restart apache

ashutoshr’s picture

Check settings.php, and remove script if you wrote for configuring of any caching modules and any other module. In my case there was wincache module setting script there.. Initially I ignore this, but that was the culprit. I wasted three day in this issue..