Re: CakePHP Session expiring problems...

2007-05-10 Thread joel
On Mar 19, 3:04 pm, "Andre" <[EMAIL PROTECTED]> wrote: > So, since I'm trying to build a blog application, this could be a > problem, because if a session expires while I'm still writing my > article, as soon as I press the submit button all of my work becomes > dust. Andre, I got through this a

Re: CakePHP Session expiring problems...

2007-04-04 Thread purepear
I admit i didn't read the whole discussion, but i think if you set define('CAKE_SESSION_SAVE', 'cake'); it might work( in /app/config/ core.php). Note that the default value is 'php' and thus all sessions will be managed by PHP and its default options. I'm not really sure what i'm saying because i

Re: CakePHP Session expiring problems...

2007-03-20 Thread Chris Hartjes
On 3/20/07, majna <[EMAIL PROTECTED]> wrote: > > or use autosave, with ajax, save as draft, like gmail do. > Now *that* is a good solution. Autosave will then update your session, causing it to not expire. Pretty slick. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" rallyhat.

Re: CakePHP Session expiring problems...

2007-03-20 Thread bernardo
I think that what you want to achieve is clear. But I think you have to set the timeout to more than 20 minutes if you want someone to be able to send a post more than 20 minutes after loging in, just for trying set it to something really high, and also set the session.gc_maxlifetime. No matter ho

Re: CakePHP Session expiring problems...

2007-03-20 Thread majna
or use autosave, with ajax, save as draft, like gmail do. On Mar 20, 3:15 pm, "Andre" <[EMAIL PROTECTED]> wrote: > On 20 Mar, 14:34, "bernardo" <[EMAIL PROTECTED]> wrote: > > > Try using this: ini_set("session.gc_maxlifetime","14400"); > > and set CAKE_SESSION_SECURITY to high. > > That ini_set t

Re: CakePHP Session expiring problems...

2007-03-20 Thread Andre
On 20 Mar, 14:34, "bernardo" <[EMAIL PROTECTED]> wrote: > Try using this: ini_set("session.gc_maxlifetime","14400"); > and set CAKE_SESSION_SECURITY to high. That ini_set thing should be placed in cake/libs/session.php, right? If it's so, I've done it, but the problem persists. Maybe I'm dumb an

Re: CakePHP Session expiring problems...

2007-03-20 Thread Chris Hartjes
On 3/20/07, majna <[EMAIL PROTECTED]> wrote: > > function __gc($expires) { > $db =& ConnectionManager::getDataSource('default'); > $table = $db->fullTableName(CAKE_SESSION_TABLE); > $db->execute("DELETE FROM " . $db->name($table) . " WHERE " . > $db

Re: CakePHP Session expiring problems...

2007-03-20 Thread bernardo
Then note what Grant Cox said. What you want is the server side session to last for a long period, then it would seem that session lasts until the browser is closed, but that is just because the browser forgets the cookie. Try using this: ini_set("session.gc_maxlifetime","14400"); and set CAKE_SE

Re: CakePHP Session expiring problems...

2007-03-20 Thread majna
Back to cake db sessions: (1.1.13.4450 ) cake/ libs/session: session_set_save_handler(array('CakeSession','__open'), array('CakeSession', '__close'),

Re: CakePHP Session expiring problems...

2007-03-20 Thread Andre
That's right. By the way, the other framework I'm using is Code Igniter, and the custom PHP session library is this one: http://www.codeigniter.com/wiki/PHPSession/. The way I see it, it would be great to be able to port a Class like that in CakePHP. For some reasons, I don't like my session to

Re: CakePHP Session expiring problems...

2007-03-19 Thread bernardo
On Mar 19, 7:39 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote: > Do you mind expanding on which framework / language allows you to have > sessions automatically expire when the browser is closed? Do you just > mean that the session has a very long server side timeout, and by > closing the browser you

Re: CakePHP Session expiring problems...

2007-03-19 Thread Grant Cox
Do you mind expanding on which framework / language allows you to have sessions automatically expire when the browser is closed? Do you just mean that the session has a very long server side timeout, and by closing the browser your own client just forgets its cookie (which really hasn't closed th

Re: CakePHP Session expiring problems...

2007-03-19 Thread Chris Hartjes
On 3/19/07, majna <[EMAIL PROTECTED]> wrote: > > I think tehre is a bug when session is set to database. > expired sessions remains in db. > cake 1.1.13.4450 As someone who has used sessions in a database, I don't think that necessarily means that the session is still live. A custom session hand

Re: CakePHP Session expiring problems...

2007-03-19 Thread majna
I think tehre is a bug when session is set to database. expired sessions remains in db. cake 1.1.13.4450 can one confirm this? On Mar 19, 9:08 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Mar 19, 2007, at 1:54 PM, Andre wrote: > > > > > I've made a test. I've set the secu

Re: CakePHP Session expiring problems...

2007-03-19 Thread John David Anderson (_psychic_)
On Mar 19, 2007, at 1:54 PM, Andre wrote: > > I've made a test. I've set the security level to 'medium', and set the > CAKE_SESSION_TIMEOUT to 1, so that the session should expire after 100 > seconds. > After 100 seconds $this->Session->read('User') returns nothing (I've > tried to print its val

Re: CakePHP Session expiring problems...

2007-03-19 Thread Andre
I've made a test. I've set the security level to 'medium', and set the CAKE_SESSION_TIMEOUT to 1, so that the session should expire after 100 seconds. After 100 seconds $this->Session->read('User') returns nothing (I've tried to print its value), and, in reply to your question, nope, my cookies ar

Re: CakePHP Session expiring problems...

2007-03-19 Thread John David Anderson (_psychic_)
On Mar 19, 2007, at 1:04 PM, Andre wrote: > > I was looking at the user authentication example in the manual, and > I've noticed that the CakePHP Session do have a timeout after a > certain amount of time, based on the application's security level. > > So, since I'm trying to build a blog applic