Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
On 12 Okt., 15:04, 浪漫様 wrote: > In a normal world, the following code would work... you receive a > variable on your function, and you save it on a session, then the next > page is able to read it ( the SET is just to display it on the > views )... however, in CakePHP 1.3.4 Stable seems to fail, i can see > the variable on the initial function [ browse ], but is empty in the > following function [ display ] > > function browse($variable) { > $this->Session->write('mysession.variable', $variable); > $this->set('variable', $variable); > > } // function: browse > > function display() { > $this->set('variable', $this->Session->read('mysession.variable')); > > } // function: display > > More funny is that the following code DOES WORK: > > function browse() { > $variable = 5; > $this->Session->write('mysession.variable', $variable); > $this->set('variable', $variable); > > } // function: browse > > function display() { > $this->set('variable', $this->Session->read('mysession.variable')); > > } // function: display > > So seems the problem i'm experiencing is only with the variable you > get through the functions parameters... anyone has a clue on what's > going on? is driving me crazy and it makes no fuc*ing sense. I didn't > seem to experience that behavior on CakePHP 1.2 though. > thanks > > Rohman what does your router say? you probably should use something like: Router::connect('browser/:VAR', array('plugin' => '', 'controller' => 'yours', 'action' => 'browse', VAR); i had lot's of problems without using the acronyms after the actions. i have no idea why but with this router configuration it always worked. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
Are you passing the $variable trough the url? If so, Instead of using $variable try using this $this->params['pass'] [0] on the browser function: It would be like: function browse($variable) { $this->Session->write('mysession.variable', $this->params['pass'] [0]); $this->set('variable', $variable); } Also make sure that the param is passed through the url On 13 out, 03:22, dtemes wrote: > what backend are you using for your sessions? I had similar issues > while working with database stored sessions, but using cake or php > sessions works fine. > > On 12 oct, 20:52, cricket wrote: > > > > > On Tue, Oct 12, 2010 at 9:19 AM, 浪漫様 wrote: > > > no, i'm on HTTP only : ) > > > and the sessions works fine, the only problem is when using the > > > $variable from the controller's function... then it turns to be empty. > > > thanks > > > And you can see the variable from the browse view? Are you certain > > that browse() is being passed a param? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
what backend are you using for your sessions? I had similar issues while working with database stored sessions, but using cake or php sessions works fine. On 12 oct, 20:52, cricket wrote: > On Tue, Oct 12, 2010 at 9:19 AM, 浪漫様 wrote: > > no, i'm on HTTP only : ) > > and the sessions works fine, the only problem is when using the > > $variable from the controller's function... then it turns to be empty. > > thanks > > And you can see the variable from the browse view? Are you certain > that browse() is being passed a param? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
On Tue, Oct 12, 2010 at 9:19 AM, 浪漫様 wrote: > no, i'm on HTTP only : ) > and the sessions works fine, the only problem is when using the > $variable from the controller's function... then it turns to be empty. > thanks And you can see the variable from the browse view? Are you certain that browse() is being passed a param? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
no, i'm on HTTP only : ) and the sessions works fine, the only problem is when using the $variable from the controller's function... then it turns to be empty. thanks Rohman On Oct 12, 9:16 pm, Jeremy Burns | Class Outfit wrote: > Are you using https? > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 12 Oct 2010, at 14:04, 浪漫様 wrote: > > > > > In a normal world, the following code would work... you receive a > > variable on your function, and you save it on a session, then the next > > page is able to read it ( the SET is just to display it on the > > views )... however, in CakePHP 1.3.4 Stable seems to fail, i can see > > the variable on the initial function [ browse ], but is empty in the > > following function [ display ] > > > function browse($variable) { > > $this->Session->write('mysession.variable', $variable); > > $this->set('variable', $variable); > > } // function: browse > > > function display() { > > $this->set('variable', $this->Session->read('mysession.variable')); > > } // function: display > > > More funny is that the following code DOES WORK: > > > function browse() { > > $variable = 5; > > $this->Session->write('mysession.variable', $variable); > > $this->set('variable', $variable); > > } // function: browse > > > function display() { > > $this->set('variable', $this->Session->read('mysession.variable')); > > } // function: display > > > So seems the problem i'm experiencing is only with the variable you > > get through the functions parameters... anyone has a clue on what's > > going on? is driving me crazy and it makes no fuc*ing sense. I didn't > > seem to experience that behavior on CakePHP 1.2 though. > > thanks > > > Rohman > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!
Are you using https? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 14:04, 浪漫様 wrote: > In a normal world, the following code would work... you receive a > variable on your function, and you save it on a session, then the next > page is able to read it ( the SET is just to display it on the > views )... however, in CakePHP 1.3.4 Stable seems to fail, i can see > the variable on the initial function [ browse ], but is empty in the > following function [ display ] > > function browse($variable) { > $this->Session->write('mysession.variable', $variable); > $this->set('variable', $variable); > } // function: browse > > function display() { > $this->set('variable', $this->Session->read('mysession.variable')); > } // function: display > > More funny is that the following code DOES WORK: > > function browse() { > $variable = 5; > $this->Session->write('mysession.variable', $variable); > $this->set('variable', $variable); > } // function: browse > > function display() { > $this->set('variable', $this->Session->read('mysession.variable')); > } // function: display > > So seems the problem i'm experiencing is only with the variable you > get through the functions parameters... anyone has a clue on what's > going on? is driving me crazy and it makes no fuc*ing sense. I didn't > seem to experience that behavior on CakePHP 1.2 though. > thanks > > Rohman > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en