PDA

View Full Version : Set different Session Timeout for guest


basketmen
12-13-2011, 09:10 PM
In table session, using phpmyadmin, i see too many rows, it can be highload, current Session timeout is still Default : 900

i want to change Session timeout for guest : 600
but for member still : 900


is there a way to do that?




if needed a plugin, is this will working? :

Product : vbulletin
Hook Location : global_start
Title : different Session Timeout for guest
Execution Order : 1
Plugin PHP Code :

if (is_member_of($bbuserinfo, 0))
{
$vbulletin->options['cookietimeout']='600';
<else />
$vbulletin->options['cookietimeout']='900';
}



and let empty admincp > vboptions > Cookies and http header options > Session timeout






really please share your experience, i want to try it

Lynne
12-13-2011, 09:27 PM
That will not remove the rows from the session table - that gets done by a Scheduled Task that runs once an hour.

basketmen
12-13-2011, 10:02 PM
That will not remove the rows from the session table - that gets done by a Scheduled Task that runs once an hour.
no, above plugin is to set Session Timeout

replacing the value in admincp > vboptions > Cookies and http header options > Session timeout

for existed rows in sesions table, i will just empty it in phpmyadmin



is it above plugin will work to set different Session Timeout for guest?

Lynne
12-14-2011, 01:03 AM
But you said your problem was too many rows in the session table, and what I'm saying is that changing the session timeout via that plugin is going to do nothing for the rows in the session table.