Hi all,
My cake php works well, but I can't work with session!! They simply
dosen't work! it seems that session is active, but not started, and I
don't know how to start it...

In my core.php I have:

        Configure::write('Session.save', 'php');
        //Configure::write('Session.table', 'cake_sessions');
        //Configure::write('Session.database', 'default');
        Configure::write('Session.cookie', 'CAKEPHP');
        Configure::write('Session.timeout', '120');
        Configure::write('Session.start', true);
        Configure::write('Session.checkAgent', true);
        Configure::write('Security.level', 'high');

My conroller index() method is:

function index($pag=1)
{
        //$this->Session->activate();

        $cond = null;
        $condCont=0;

        // scrivo la pagina nella sessione
        $this->Session->write( 'currentPag', $pag  );

        if(!empty($this->data)) {
        // devo aggiornare le variabili di sessione con i parametri inviati
        // il processing successivo verifica solo le variabili di sessione

                if ($this->data['Subjects/clear']) {
                // elimino i filtri di ricerca
                        $this->Session->del('pvFilter');
                        $this->Session->del('qsFilter');
                        $this->Session->del('intFilter');
                } else {
                // altrimenti aggiorno le variabili di sessione

                        if ( !empty($this->data['Subjects/pv']) ) {
                                $this->Session->write('pvFilter', 
$this->data['Subjects/pv']);

                        } elseif ($this->Session->check('pvFilter')) {
                                 $this->Session->del('pvFilter');
                        }

                        if ( !empty($this->data['Subjects/qs']) ) {
                                $this->Session->write( 'qsFilter', 
$this->data['Subjects/qs'] );

                        } elseif ($this->Session->check('qsFilter')) {
                                $this->Session->del('qsFilter');
                        }

                        if ( $this->data['Subjects/int'] !== null && 
$this->data['Subjects/
int'] != '') {
                                $this->Session->write( 'intFilter', 
intval($this->data['Subjects/
int'])  );

                        } elseif ($this->Session->check('intFilter')) {
                                $this->Session->del('intFilter');
                        }
                }
        }


        pr($this->Session);   <-------------
        pr($_SESSION);

        [ ... snip ... ]
}


Here what prints out the highlighted function:

SessionComponent Object
(
    [__active] => 1
    [__started] =>
    [__bare] => 0
    [valid] =>
    [error] =>
    [_userAgent] => ffe15c041ea243f147f1ded68bdad34c
    [path] => /
    [lastError] =>
    [security] => medium
    [time] => 1231510901
    [sessionTime] => 1231522901
    [watchKeys] => Array
        (
        )

    [id] =>
    [_log] =>
    [host] => fuckyp.edisoft.local
    [enabled] => 1
    [cookieLifeTime] => 604800
)

Array
(
    [currentPag] => 2
)


Thank a lot
g4b0

--~--~---------~--~----~------------~-------~--~----~
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