Set debug > 0 and check for errors.
Check session files store path to be writable by cake.

On Apr 5, 11:32 pm, "Deud'tens" <[email protected]> wrote:
>  Hello, sorry for my english, I'm french.
>
> I have a god damn problem with sessions of cakephp : they don't work !
> When I flash to another controller/action, everything is lost. I went
> into the core.php file and lowered everything possible and tried all
> the session handlers :
>
> Configure::write('Session.checkAgent', false);
> Configure::write('Security.level', 'low');
>
> etc.
>
> But it doesnt work. I already read many discussions about this problem
> but I couldnt solve it. This is a simple example of what I want to
> do :
>
> CODE
>
> <?php
>
> class UsersController extends AppController
> {
>  function login()
>  {
>    if (!empty($this->data))
>    {
>      $userId = $this->User->loginVerif($this->data);
>      if ($userId != null)
>      {
>        $this->Session->write('Login.id', $userId);
>        print_r($_SESSION);//Works fine
>        $this->flash("Vous vous êtes authentifié avec succès.", "/
> quizzes/jouer");
>      }
>    }
>  }}
>
> ?>
>
> And the controller called by the previous action :
>
> CODE
>
> <?php
>
> class QuizzesController extends AppController
> {
>  function jouer()
>  {
>    echo $this->Session->read('Login.id');//Totally empty !
>    $quiz = $this->Quiz->details();
>    $this->set('quiz', $quiz);
>  }}
>
> ?>
>
> I know that there's already an authcomponent, but it doesnt work, for
> the same reasons I guess.
>
> Thanks for all in advance !
--~--~---------~--~----~------------~-------~--~----~
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