1
CreepyGnome
No one can login after changing Use custom session to yes
  • 2008/3/2 4:31

  • CreepyGnome

  • Just popping in

  • Posts: 1

  • Since: 2008/3/2 2


Hello,

I installed XOOPS today in a test environment for evaluation purposes.

After I changed the "Use custom session" to yes users including the administrator cannot login. It recognizes them and informs them that they are being logged in. However it returns them back to the original page with a login dialog and unregistered user privileges.

I know this setting is at fault because I went into the database and changed it back and users can log back on.

I am using version 2.0.18.1. I tested this problem with IE7 and Firefox 2 and I have the same results.

Any help would be appreciated, I would like to be able to enable this feature.

Kind Regards,

-Creepy

2
psyco
Re: No one can login after changing Use custom session to yes
  • 2008/3/3 15:22

  • psyco

  • Just popping in

  • Posts: 1

  • Since: 2007/10/8


I have the same version of XOOPS and the same problem. Yesterday I change "Use custom session" to "Yes" and now nobody can to login. I'm administrator and I can't login to. Where do I have to chenge something in database to changed it back as defoult?

Can anybody help?

CreepyGnome you have changed it back in database, con you please tell me where to change it?? Tnx

sorry for my poor English

3
eejut
Re: No one can login after changing Use custom session to yes
  • 2008/3/6 15:40

  • eejut

  • Just popping in

  • Posts: 86

  • Since: 2005/5/16


this is a well known problem thats been around since at least 2.0.16.0 and for some unknow reason the 'experts' avoid it like the plague

take for instance i have just updated from 2.0.18.1 RC to 2.0.18.1 and ..guess what
nobody can log in , ohh yes it says thankyou for logging in , yet returns you to the main page as if you have never even tried to login
i had hoped they would fix it, but no luck again, it beats me what the heck they have done and i cannot imagine why they carry on as if nothing is wrong

ohh btw anyone else reading this who has done the same as me and updated and cannot login, just replace the new session.php with the 2.0.18.1 one you backed up and you can at least login, but not for long as it will kick you out whenever it feels like it :)
shyte really and amazing how it gets hidden or removed from the face of the earth (ok these forums ) if you whinge about it too much

4
armitage
Re: No one can login after changing Use custom session to yes
  • 2008/3/6 20:23

  • armitage

  • Just popping in

  • Posts: 31

  • Since: 2005/8/19


I was having problems with custom_session behavior on 2.0.18 (the 'login > thanks for logging in > you don't have access' dance) and discovered that Protector was in temp disable mode.

I then checked my control installation (on the same server - it was behaving normally WRT custom_session) and Protector was enabled there. Re-enabled protector on problem XOOPS and Voila! custom_session goodness.

IINM, for custom_session to work correctly, you must also pay attention to your servers' time zone. Admin > Preferences > General Settings > Server Timezone and Default Timezone must be set to match the servers' location.

Hope this helps some of the folks who are having session problems (there seem to be a lot of them).

[edit]
It seems like I jumped the gun. Trying the

XOOPS/kernel/session.php
var $enableRegenerateId = false;

I'll post my results...

5
Anonymous
Re: No one can login after changing Use custom session to yes
  • 2008/3/6 20:29

  • Anonymous

  • Posts: 0

  • Since:


Quote:
armitage wrote:

IINM, for custom_session to work correctly, you must also pay attention to your servers' time zone. Admin > Preferences > General Settings > Server Timezone and Default Timezone must be set to match the servers' location.


I have to confess to not having thought of that one - good advice

I'm one of those who hasn't had the problem; my server's timezone and my personal timezone are the same, so maybe there's something in it. Thank you.

6
armitage
Re: No one can login after changing Use custom session to yes
  • 2008/3/6 21:05

  • armitage

  • Just popping in

  • Posts: 31

  • Since: 2005/8/19


I had to strain the brainbox pretty hard to come up with that one. Most of my XOOPS installs have been on servers in my own time zone, so it wasn't a problem for me, either, until it was.

Only makes sense when you consider a session has a time limit, and if it ends before it begins (so to speak) it could surely cause problems.

7
Arowana
Re: No one can login after changing Use custom session to yes
  • 2008/3/8 19:49

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


Quote:
I know this setting is at fault because I went into the database and changed it back and users can log back on.



Ok here you go:

Login to your database and under _config table click browse
show 500 records from 0 and you will see "use_mysession" edit that and the "conf_value" should be set to "0"

Click Go and then try to login to your site.

Hope this helps
Arowana

8
somekool
Re: No one can login after changing Use custom session to yes
  • 2008/3/15 16:56

  • somekool

  • Just popping in

  • Posts: 5

  • Since: 2008/3/15


my use_mysession config is already set to 0

but I still can't login.

what else could it be?

9
benCorpo
Re: No one can login after changing Use custom session to yes
  • 2008/3/19 13:52

  • benCorpo

  • Just popping in

  • Posts: 17

  • Since: 2006/2/5 2


I have the solution.

This line (line #262) in include/common.php that was emptying the user info:
// Remove expired session for xoopsUserId
if ( $xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']]) && !e
mpty($_SESSION['xoopsUserId']) ) {
unset( $_SESSION['xoopsUserId'] );
}

For some reason, right after the login, I suspect the cookie to contain the wrong info, thus preventing anyone from login anymore.

I commented out the line #263 (the unset()) and everything is back to normal!

Hope this is useful.
Ben

Login

Who's Online

191 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 191


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits