Jump to content


Photo

extending a time out of a session


  • Please log in to reply
6 replies to this topic

#1 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 17 May 2006 - 11:24 PM

how do i extending a time out of a session. Does it have to be done on each web page. ?

Desmond.


#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 17 May 2006 - 11:42 PM

change the php ini value session.cookie_lifetime
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 18 May 2006 - 12:13 AM

[!--quoteo(post=374817:date=May 18 2006, 12:42 AM:name=ryanlwh)--][div class=\'quotetop\']QUOTE(ryanlwh @ May 18 2006, 12:42 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
change the php ini value session.cookie_lifetime
[/quote]

This does not help

change the php ini value session.cookie_lifetime

I have no access to the server I am a user of a web host.

ALL i have is session destroy, Unload etc.



#4 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 18 May 2006 - 11:33 AM

This is obviously a dificult one I thought someonre knew of a a way of extending a sesion timeout from
the default 20 minutes to 30 minutes in code. It can be done in ASP.

#5 samshel

samshel
  • Members
  • PipPipPip
  • Advanced Member
  • 837 posts

Posted 18 May 2006 - 12:03 PM

Hello,

Use session_set_cookie_params() in a page which is included in all pages (example : header or database connections file)

hth
Cheers,
SamShel
-----------------------------------------------
--: FUTURE IS LINUX :--
-----------------------------------------------

#6 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 18 May 2006 - 12:18 PM

PHP Manual gives example session_cache_expire For PHP 4.2.0 and above
I get an error on this undefind function. My Web remote server is 4.3.2

session_cache_expire can be used to set a time or return a time. Documentation states default 180 and this is in minutes

session_set_cookie_params(180); does not give an error. If this is working is the time 180 minute and can I get the current value as session_cache_expire claims.


#7 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 18 May 2006 - 04:01 PM

session.cookie_lifetime(180); Fatal error: Call to undefined function: cookie_lifetime() in e:\domains\d\des-otoole.co.uk\user\htdocs\index.php on line 4
session_start();

session_set_cookie_params(180); times out after 20 minutes
session_start();

session_cache_expire(180); times out after 20 minutes
session_start();

session_start();
session_cache_expire(180); times out after 20 minutes but Session remains on new browser

session_start();
session_set_cookie_params(180); times out after 20 minutes but Session remains on new browser

None of the above functions in any configuration works. The figure of 180 comes from this website session_cache_expire
and is suposed to be the default in minutes.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users