I have to login after any action

abaris - December 6, 2006 - 14:32

After a fine installation I got my first trouble:

After any action (clicking submit after changing password, entering any admin's place...) I am asked (again) for my user and password. I type them in (the ones that where sent by email) and go to the place that I wanted. The trouble itself isn't having to type my pass, the trouble is I can't change my password, add modules or do anything. When I click the submit button to apply the changes I have to login again and after that the changes are not done.

I work on a debian testing with apache2, mysql5 and php5.

Thanks a lot for your help and sorry about my horrible english.

Some session handling

cog.rusty - December 6, 2006 - 16:38

Some session handling problems with PHP 5.2 were fixed recently. Update to 4.7.x-dev from the link on the right sidebar here.

Me too

petetspm - December 6, 2006 - 17:29

... with the latest versions of everything.

Any other ideas?

you are sure you are running

VeryMisunderstood - December 6, 2006 - 17:42

you are sure you are running the 4.7.4 - dev version ? and not the 4.7.4 public release ?

you can get the 4.7.4 dev release (what will likely become drupal 4.7.5) from http://drupal.org/drupal-4.7.x-dev

you can manually patch Drupal to run properly on PHP 5.2
use PHP 5.2 as a search term and seek out the proper patches.

Switching to anon

petetspm - December 6, 2006 - 17:53

From the logs you can see whats happening - all the actions are as anon. It seems to be switching to the anon user. I'll check the patches ....

user 12/06/2006 - 17:48 Session opened for petetspm. petetspm
access denied 12/06/2006 - 17:47 admin/logs denied access. Anonymous view
user 12/06/2006 - 17:47 Session opened for petetspm. petetspm
access denied 12/06/2006 - 17:45 admin denied access. Anonymous view
access denied 12/06/2006 - 17:23 admin denied access. Anonymous view
user 12/06/2006 - 17:23 Session opened for petetspm. petetspm
user 12/06/2006 - 17:22 Login attempt failed for petetspm. Anonymous
access denied 12/06/2006 - 17:22 user/1 denied access. Anonymous view
user 12/06/2006 - 17:22 Session opened for petetspm. petetspm
user 12/06/2006 - 17:21 Session opened for petetspm. petetspm
access denied 12/06/2006 - 17:21 user/1/edit denied access. Anonymous view
access denied 12/06/2006 - 17:19 user/1/edit denied access. Anonymous view
access denied 12/06/2006 - 17:12 user/1/edit denied access. Anonymous view
user 12/06/2006 - 17:12 New user: petetspm ... Anonymous edit

Pete Johnson

Two possible reasons

cog.rusty - December 6, 2006 - 17:43

Two possible reasons mentioned in the Troubleshooting FAQ

http://drupal.org/node/77106

1. Cache problem: Disable Drupal's cache.
2. Login confusion with www vs no-www: Use an apache rewrite to use only one.

My problem resolved using

abaris - December 6, 2006 - 18:09

My problem resolved using drupal-4.7.x-dev

Thanks a lot to everybody!

Patch fix on 4.7.4. General Release

petetspm - December 6, 2006 - 18:40

Patch resolves on 4.7.4 General release

--- includes/session.inc 11 Apr 2006 11:33:14 -0000 1.27
+++ includes/session.inc 10 Nov 2006 20:29:04 -0000
@@ -17,6 +17,11 @@ function sess_close() {
function sess_read($key) {
global $user;

+ // Write and Close handlers are called after destructing objects since PHP 5.0.5
+ // Thus destructors can use sessions but session handler can't use objects.
+ // So we are moving session closure before destructing objects.
+ register_shutdown_function('session_write_close');
+
// retrieve data for a $user object
$result = db_query("SELECT sid FROM {sessions} WHERE sid = '%s'", $key);
if (!db_num_rows($result)) {

Thanks very much

Pete Johnson

 
 

Drupal is a registered trademark of Dries Buytaert.