In the core.php there is this section:

* The preferred session handling method. Valid values:
 *
 * 'php'                        Uses settings defined in your php.ini.
 * 'cake'               Saves session files in CakePHP's /tmp directory.
 * 'database'   Uses CakePHP's database sessions.
 *
 * To define a custom session handler, save it at /app/config/
<name>.php.
 * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
 *
 * To use database sessions, execute the SQL file found at /app/config/
sql/sessions.sql.
 *
 */
        Configure::write('Session.save', 'php');

 By default, the sessions are handled by the php, so try to set it for
cake:

        Configure::write('Session.save', 'cake');

 and make sure the /tmp directory is writable.
Or if you want to stick with the default, look for problems in your
active php.ini file...

On Apr 8, 4:16 pm, "Dr. Loboto" <drlob...@gmail.com> wrote:
> 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" <deudt...@gmail.com> 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 !- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to