#4556: Redirect erases session --------------------------------------------------------------------+------- Reporter: kleingy | Owner: Type: RFC | Status: reopened Priority: Medium | Milestone: 1.3.x.x Component: Session | Version: Severity: Trivial | Resolution: Keywords: redirect session lost kleingy mustan9 the_undefined | Php_version: PHP 4 >= 4.3.2 Cake_version: | --------------------------------------------------------------------+------- Comment (by fx3):
The problem is very illusive because it only appears when you try to write to a session and redirect in the same page while the session is already timed out. One way to replicate it is to create a mock page (name it check1) with: {{{ //check1 page $this->Session->write('test'); $this->redirect('/test/check2'); }}} Now in page 'check2' : {{{ //check2 page var_dump($this->Session->check('test')); pr($this->Session->read('test')); }}} What you will find is it will work most of the time, however, if you change session timeout to 10 seconds, and wait until it times out, and hit page 'check1' that the session is empty. but if you run 'check2' before 'check1' (within 10 second interval) the session is saved. I can provide a more .. functional test case if need be but this should be self expanatory. I should mention this is on version 1.1 but im hearing reports of same problems with 1.2 as well. If there is already a solution i did not find it. -- Ticket URL: <https://trac.cakephp.org/ticket/4556#comment:21> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---