Re: [CakePHP : The Rapid Development Framework for PHP] #6406: session helper not working with cached views
#6406: session helper not working with cached views +--- Reporter: zaptree | Owner: DarkAngelBGE Type: Bug |Status: new Priority: Medium | Milestone: 1.2.x.x Component: General | Version: 1.2 Final Severity: Normal |Resolution: Keywords: session caching | Php_version: PHP 5 Cake_version: 1.2.3.8166 | +--- Changes (by DarkAngelBGE): * owner: = DarkAngelBGE * status: reopened = new Comment: Okay this is odd .. I set up a working example of what your use case. It works totally fine. Even on the cached page am I logged out. So can you provide all the code that got something todo with how you login and logout, including AppController::beforeFilter() and your core.php session-relevant settings? Thanks -- Ticket URL: https://trac.cakephp.org/ticket/6406#comment:4 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6406: session helper not working with cached views
#6406: session helper not working with cached views +--- Reporter: zaptree | Owner: DarkAngelBGE Type: Test Case|Status: new Priority: Medium | Milestone: 1.2.x.x Component: Session | Version: 1.2 Final Severity: Normal |Resolution: Keywords: session caching | Php_version: PHP 5 Cake_version: 1.2.3.8166 | +--- Changes (by DarkAngelBGE): * type: Bug = Test Case * component: General = Session Comment: Could you if possible attach a test case as well? -- Ticket URL: https://trac.cakephp.org/ticket/6406#comment:5 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6406: session helper not working with cached views
#6406: session helper not working with cached views +--- Reporter: zaptree | Owner: Type: Bug |Status: closed Priority: Medium | Milestone: 1.2.x.x Component: General | Version: 1.2 Final Severity: Normal |Resolution: needmoreinfo Keywords: session caching | Php_version: PHP 5 Cake_version: 1.2.3.8166 | +--- Changes (by gwoo): * status: new = closed * resolution: = needmoreinfo -- Ticket URL: https://trac.cakephp.org/ticket/6406#comment:2 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6406: session helper not working with cached views
#6406: session helper not working with cached views +--- Reporter: zaptree | Owner: Type: Bug |Status: reopened Priority: Medium | Milestone: 1.2.x.x Component: General | Version: 1.2 Final Severity: Normal |Resolution: Keywords: session caching | Php_version: PHP 5 Cake_version: 1.2.3.8166 | +--- Changes (by zaptree): * status: closed = reopened * resolution: needmoreinfo = Comment: Sorry for the late reply, yes i checked that the code is php. I believe the problem has something to do with the var sessionTime in the session class. The session component sets it because in the __construct($base = null, $start = true) its set to true where as the session helper has start set to false so the var sessionTime is not set. So it seems that the session helper is not using our defined session expiration time but php's standard session expiration? im not really sure. Also I noticed another wierd behaviour. I have a requestAction that basically calls a page that gets the logged in users data if he is logged in otherwise sends back false so that i can show a login form. When i use the requestAction in my view before calling (i have it nocache block and the php code is in cached views in tmp): {{{ ?php $this-requestAction('loginbox'); if($session-check('Auth.User')){ echo 'Logged In'; }else{ echo 'not logged in'; { ? }}} then it works fine and shows me that im not logged in when im not and then the following session helper works correctly also. But if i have the requestAction after the session helper being used then they both dont work. So i guess that probably one instance of the session object is created or something and if the session helper creates it first its got the wrong expiration time and then even the session component will get it wrong?? Well i hope this info helps. I fixed my app by making sure that the loginbox code is first (had to float right the divs since it was supposed to be on the right) but on other circumstances i might not want to have to use requestAction if not necessary because it slows down the app. -- Ticket URL: https://trac.cakephp.org/ticket/6406#comment:3 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6406: session helper not working with cached views
#6406: session helper not working with cached views +--- Reporter: zaptree | Owner: Type: Bug |Status: new Priority: Medium | Milestone: 1.2.x.x Component: General | Version: 1.2 Final Severity: Normal |Resolution: Keywords: session caching | Php_version: PHP 5 Cake_version: 1.2.3.8166 | +--- Comment (by DarkAngelBGE): Can you look into the cached file in /app/tmp/cache/views for your page if the code around this is actually php code and not hardcoded markup? We just want to make sure, that the cake:nocache tags work properly here. Do you have a logout action via which you could successfully reproduce the bug? -- Ticket URL: https://trac.cakephp.org/ticket/6406#comment:1 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 -~--~~~~--~~--~--~---