Thursday, 15 August 2013

session - drupal 7 - can't restore anonymous user -


I noticed that my unknown user was removed by something when I saw $ _SESSION crashing to an anonymous user

After gogal like a leopard, I put a look at my users in SQL and effectively the UID = 0 was not here.

So I apply the solution given by many people like: Add it to SQL:

And then flush the cache However, if the line uid = 0 is now with us, the anonymous still is not shown in the user list and $ _SESSION has still crashed.

Can anyone help me fix this problem? (Apologies for my English)

Edit: As I thought I can not understand it to fix it, I give you a good shot of your line:

Enter image details here

Pls need help, I use $ _SESSION Can not replace

OK, this is strange but it seems that the session for the anonymous user Has not started Therefore, adding this code to my module resolves my problem:

  if (session_id () == '') {// session session is not started); }   

But if someone knows the proper way to fix it, then I will take it

No comments:

Post a Comment