The site worked till yesterday and just now it's behaving strangely.
The site is not created with features, an archive dump including the code and database is copied to server, and the old installation is replaced with the new one manually (unfortunately).Now it is irrelavant also happening on local server.- No caching module is installed. Session API is not also installed.
- Theme is set to 'seven' (core admin theme, just in case).
- The watchdog does not contain any error, warning or info except the usual "session opened for user xyz";
- The settings file does not contain any special cookie directive. It never did.
- The site is running on php 5.6, Apache 2.2, CentOS 6. PHP is running as fast-cgi. Same as always.
- It's Drupal 7.
I go to example.com/user/login, enter username and password, the form is submitted successfully, the page is redirected to example.com/user/%uid (tried both uid 1 and other users). and boom! I get an access denied. And the user is not logged in.
If I truncate the sessions table with truncate table sessions
I can log in once and once only, with any user. Then again no one can log-in not even uid 1.
Also with a password reset link (using the command drush uli
I can log in with no problem).
I disabled all contrib modules and theme, but the same problem persists.
What is causing such problems with sessions? any ideas?
uid
of 0 (it often gets nuked by sql dumping software and re-numbered). What you're describing is exactly what happens when that record goes awol