In TwoController::bug() your call to SessionComponent seems
nonsensical. Looking at what you are trying to do it should either be

$this->Session->check('key') which should return TRUE since you set
this value in OneController::start(), or

($this->Session->read('key') == 'info') which should also return TRUE
for the above reason

On Aug 11, 10:06 pm, LS <[email protected]> wrote:
> Hello, everyone.
>
> I'm into a dead end and I can't seem to get this session and redirect
> things right...
>
> I've tested this using cakephp, php and database session methods.
>
> I have two controllers and one action in each one, like this:
>
> <?php
>
> class OneController extends AppController {
>   function start() {
>     $this->Session->write('key', 'info');
>     $this->redirect('/two/bug');
>     // exit; // <<-- with or without this, I get the error.
>   }
> (...)
> ?>
>
> other file
> <?php
>
> class TwoController extends AppController {
>   function bug() {
>     if ($this->Session->check('info')) {
>       // This never happens!
>       echo("working");
>     }
>   }
>
> }
>
> ?>
>
> When I check the database, I see two sessions, one with the info that
> was written on the controller "one", and another one almost empty
> (only timeout and other info).
>
> I've even set the <?php Configure::write('Session.checkAgent',
> false); ?> on the core.php file, but it still no good.
>
> Can someone enlight me, please?
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to