Community & Support

User not logged out after closing browser window !!

I installed drupal 4.7.x version for the Linux user group community at my college ...
Its working beautifully except for the session management part of it ... When a user log in and closes his/her browser window without logging out ... he is considered logged in by the system ... when his session should be closed by drupal ... IS this a bug or there is some module I am unaware off ? Because i suppose this should be integrated part of drupal responsibility to log out the user if he forgets to log out explicitly and instead close the browser window ... This is problematic in university kind of enviroment, where systems are used on sharing basis ..

Thanks a lot in advance ...

Comments

it will evetually log out.

it will evetually log out. this is set this way to keep users from accidentally closing the browser session, coming right back and having to log rigt back in.

the session lifetime can be set in settings.php (I think) set to 0

You can control this in settings.php

Open sites/default/settings.php and go to line 130. The session cookie lifetime is set there. As above, setting it to 0 will make the session expire when the user quits the browser. So, change the line so that it reads as follows:
ini_set('session.cookie_lifetime',  0);

=======================
Just another newbie.
XHTML Strict: it's the way to be.
=======================
Feature request: HTML Source Formatting in TinyMCE

Thanks a lot ... But ...

thanks a lot ...
But its not working .... Do I have to rerun some service ... I have set the 20000000 thing to 0 ... and saved the settings.php file ... and when i again tested ... the user is still logged in after closing the browser window ...
Do I have to rerun something for changes to take effect ? This thing is important for the website i m deploying ...
And are these values in seconds ?

Thanks in advance ...

--------------------------------------------------------
Dipen Chaudhary
www.qed42.com ( Drupal development services specialize in social networks and other user generated content platforms )
www.dipenchaudhary.com

clear your sessions table in

clear your sessions table in the database after you make the change.

yes the value is in seconds.

It worked...

thanks ...

Actually i had to clear cookies in firefox and also .. it worked after closing all the browser window ... Which i didnt get .. there were 6 windows .. out of which only 1 had the localhost/drupal/ link open .. rest was some different pages .... But it worked ...

And yehh i did see tht manual ... Thanks a lot guys ... U ppl r great ...

Is there anything else I need to know .. I have read best practice guide n tested site backup scripts n all .. I have put tht script in cron.daily ... Any other advises ... Tht site goes online on campus LAN tomorrow ...

Hey I have forwarded the ssh port from 22 to some unguessable number ... for the ocassional root access ...
But I guess that wont stop port scanner to find tht out ... Is there any way to restrict port scanner to find that out ... ? Any more links to securing the server ? I have tried to do my best .. shutting down all irrelevant services ..

Thanks again ...

--------------------------------------------------------
Dipen Chaudhary
www.qed42.com ( Drupal development services specialize in social networks and other user generated content platforms )
www.dipenchaudhary.com

see php manual

http://us2.php.net/manual/en/ref.session.php

session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0. See also session_get_cookie_params() and session_set_cookie_params(). Since the cookie is returned by the browser, it is not prolonged to suffice the lifetime. It must be sent manually by setcookie().

=======================
Just another newbie.
XHTML Strict: it's the way to be.
=======================
Feature request: HTML Source Formatting in TinyMCE

I think you have to close

I think you have to close all active browser windows, not just DRUPAL one... In this case it should work...

nobody click here