Session timeout set incorrectly ??

General discussions here

Session timeout set incorrectly ??

Postby bgshea » Sun Nov 27, 2005 11:38 pm

In config.php $session_time is set to time() + (some limit)

This is incorrect, this is correct for cookies, but for php sessions, you only need to specify the number of minutes the session is valid for!!!

correct usage is

$sesion_time = X; (replace x with # of minutes session is valid for).

http://us2.php.net/manual/en/function.s ... expire.php

There also seems to be some overlap if i sign in with cookies, then logout, then sign in again without cookies It seems as though the php reads the cookies and keeps the session open. If the defaults are used this can be up to 30days!!!!

I'm not 100% sure about this, I'm still working on it. If anyone else knows php session/cookie management better than me, please take a look.

Also, session_cache_limiter may be used incorrectly? phplogcon sends the header, but it is probably over writen when php sessions are started. Again, not 100% sure. will post, when i figure it out.

Thanks,


P.S. don't mean to tear the code apart, but I'm paranoid of things going wrong. And loosing logs is a huge concern for me.
bgshea
Avarage
 
Posts: 19
Joined: Sun Nov 27, 2005 6:57 pm
Location: Earth

phpLogCon professional services

  • Custom phpLogCon configuration?
  • Maintenance Contract?
  • Installation support?

RE: Session timeout set incorrectly ??

Postby rgerhards » Mon Nov 28, 2005 12:21 pm

This triggers a reply ;) phpLogCon seems to have some issues with session handling in general, as I have just discovered via this thread posted on the rsyslog site:

http://www.rsyslog.com/PNphpBB2-viewtopic-t-40.phtml

Besides what you have found, I think we must reconsider the way session variables are used.

And: yes, please tear the code apart. After all, this ability is the real benefit of open source. So why not use it...

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2642
Joined: Thu Feb 13, 2003 11:57 am

RE: Session timeout set incorrectly ??

Postby bgshea » Mon Nov 28, 2005 4:10 pm

The release i posted on my site is a good start at proper session timeout. There are a few things that need to be cleaned up. I will see if i can sepend a few more hours tonight to do so.
bgshea
Avarage
 
Posts: 19
Joined: Sun Nov 27, 2005 6:57 pm
Location: Earth

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron