Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Sessions vs. Cookies
by zzzzsg on 2006/4/17 23:54:51

Hi mOnty

Thank you for the reply.

Are you using XOOPS 2.2.x?
I remember reading somewhere here that custom sessions aren't advisable. Anyway, my custom sessions time expire setting didn't work when I set it.

Also, i didn't comment out the line.

setcookie($xoopsConfig['session_name'], session_id(), time()+ 43200, '/', '', 0)

Shouldn't this line set the time expire to 12 hours?
Re: Sessions vs. Cookies
by m0nty on 2006/4/15 0:12:01

y aren't they a good idea? i always use custom sessions. never had a problem either..

and what max limit are you on about??

your edit in common.php makes no sense at all to me as it is exactly the same as the line you commented out practically.

Quote:

// setcookie($xoopsConfig['session_name'], session_id(), time()+(60*$xoopsConfig['session_expire'
]), '/', '', 0);^M
// commented out above and added line below 43200s = 12hrs
setcookie($xoopsConfig['session_name'], session_id(), time()+ 43200, '/', '', 0);^M


60*$xoopsConfig['session_expire']

if u set session time in preferences correctly you can get 12hrs?? so i don't see how your edit changes anything whatsoever.

session expire = 720 mins * 60 = 43200s = exactly what you changed it to.

i've had my testing sites set at 10080 mins all the time.. which gives me 10080 * 60 = 604800secs. = 1 week

i've had it for a month b4 too.. so i don't know what max you are on about.
Re: Sessions vs. Cookies
by zzzzsg on 2006/4/14 22:16:46

Hi jensclas

I think custom sessions aren't a good idea - read about problems with it on XOOPS 2.2.x.

And even if u edit it in system prefer, there is a max which u cannot exceed.

I would to know how to hard code the expiry time into the scripts.

I changed this is include/common.php

if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {^M
// setcookie($xoopsConfig['session_name'], session_id(), time()+(60*$xoopsConfig['session_expire'
]), '/', '', 0);^M
// commented out above and added line below 43200s = 12hrs
setcookie($xoopsConfig['session_name'], session_id(), time()+ 43200, '/', '', 0);^M
}^M
$xoopsUser->setGroups($_SESSION['xoopsUserGroups']);^M



Thank you

gui
Re: Sessions vs. Cookies
by jensclas on 2006/4/14 1:36:26

Yous et it in admin - syetem admin general preferences:

From the configuration FAQ:
Use custom session
Select yes to customise session related values.

Session name
The name of session (Valid only when 'use custom session' is enabled)

Session expiration
Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled. Works only when you are using PHP4.2.0 or later.)

Have you got the right php version?

Other than that type in a number - but not too long - in looking for an answer for you there can be issues of clogging the server with long session expiry times.

Check this FAQ

Cheers
Re: Sessions vs. Cookies
by zzzzsg on 2006/4/13 20:49:06

hi m0nty

do you know how to set the session expiry time in the php file? which file?

thank you

gui

Who's Online

183 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

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

Latest GitHub Commits