Re: Accessing cake variable from non-cake file
So a couple of ways to deal with this depending on exactly what you need the data for. You could write it to a cookie, or put some code in your non-Cake stuff to access the data you need with a query. I know Cake can be set up to use database tables for session data (I had to set it up that way for a site where I couldn't write to the tmp directory), so you should be able to access the session data from those tables. I'd look at the core libs to understand how Cake uses that data if you decide to try that. On Dec 10, 11:01 pm, RJ <[EMAIL PROTECTED]> wrote: > anyone who encountered this kind of a problem > > On Dec 10, 2:31 pm, RJ <[EMAIL PROTECTED]> wrote: > > > Thks for ur reply Rob > > > I tried the session way... but it isn't working > > > In a controller file , i created a session variable : > > $this->Session->write('status','value'); > > > In non-cake file, i tried accessing that variable : > > $_SESSION['status'] > > > but gt a blank value > > > Thanks, > > RJ > > > On Dec 10, 1:55 am, Rob <[EMAIL PROTECTED]> wrote: > > > > I would think you'd need to stuff the data into the session if you > > > want to access it from a non-Cake PHP page. > > > > On Dec 9, 9:50 am, RJ <[EMAIL PROTECTED]> wrote: > > > > > Our project is partly built using cakephp.. by that i mean only few > > > > modules are built in cakephp , while the rest are normal php files. > > > > > Now while signing out(done through non-cake file), i want to access a > > > > cake-variable so as to store that in database. > > > > > The variable in question is a global variable i.e declared in > > > > app_controller.php file > > > > > My question is can i access a cake-variable from logout.php (non-cake > > > > file) > > > > > Any help wld be appreciated. > > > > > Thanks, > > > > RJ > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Accessing cake variable from non-cake file
anyone who encountered this kind of a problem On Dec 10, 2:31 pm, RJ <[EMAIL PROTECTED]> wrote: > Thks for ur reply Rob > > I tried the session way... but it isn't working > > In a controller file , i created a session variable : > $this->Session->write('status','value'); > > In non-cake file, i tried accessing that variable : > $_SESSION['status'] > > but gt a blank value > > Thanks, > RJ > > On Dec 10, 1:55 am, Rob <[EMAIL PROTECTED]> wrote: > > > I would think you'd need to stuff the data into the session if you > > want to access it from a non-Cake PHP page. > > > On Dec 9, 9:50 am, RJ <[EMAIL PROTECTED]> wrote: > > > > Our project is partly built using cakephp.. by that i mean only few > > > modules are built in cakephp , while the rest are normal php files. > > > > Now while signing out(done through non-cake file), i want to access a > > > cake-variable so as to store that in database. > > > > The variable in question is a global variable i.e declared in > > > app_controller.php file > > > > My question is can i access a cake-variable from logout.php (non-cake > > > file) > > > > Any help wld be appreciated. > > > > Thanks, > > > RJ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Accessing cake variable from non-cake file
Thks for ur reply Rob I tried the session way... but it isn't working In a controller file , i created a session variable : $this->Session->write('status','value'); In non-cake file, i tried accessing that variable : $_SESSION['status'] but gt a blank value Thanks, RJ On Dec 10, 1:55 am, Rob <[EMAIL PROTECTED]> wrote: > I would think you'd need to stuff the data into the session if you > want to access it from a non-Cake PHP page. > > On Dec 9, 9:50 am, RJ <[EMAIL PROTECTED]> wrote: > > > Our project is partly built using cakephp.. by that i mean only few > > modules are built in cakephp , while the rest are normal php files. > > > Now while signing out(done through non-cake file), i want to access a > > cake-variable so as to store that in database. > > > The variable in question is a global variable i.e declared in > > app_controller.php file > > > My question is can i access a cake-variable from logout.php (non-cake > > file) > > > Any help wld be appreciated. > > > Thanks, > > RJ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Accessing cake variable from non-cake file
I would think you'd need to stuff the data into the session if you want to access it from a non-Cake PHP page. On Dec 9, 9:50 am, RJ <[EMAIL PROTECTED]> wrote: > Our project is partly built using cakephp.. by that i mean only few > modules are built in cakephp , while the rest are normal php files. > > Now while signing out(done through non-cake file), i want to access a > cake-variable so as to store that in database. > > The variable in question is a global variable i.e declared in > app_controller.php file > > My question is can i access a cake-variable from logout.php (non-cake > file) > > Any help wld be appreciated. > > Thanks, > RJ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Accessing cake variable from non-cake file
Our project is partly built using cakephp.. by that i mean only few modules are built in cakephp , while the rest are normal php files. Now while signing out(done through non-cake file), i want to access a cake-variable so as to store that in database. The variable in question is a global variable i.e declared in app_controller.php file My question is can i access a cake-variable from logout.php (non-cake file) Any help wld be appreciated. Thanks, RJ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---