Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2008, 03:00 AM
Junior Member
 
Join Date: May 2008
Posts: 5
Default call setOptions method, results reading null value from Session

hello everyone.

When user login successfully, I write login info to Session, as following code:

PHP Code:
       $auth Zend_Auth::getInstance();
       
$data $authAdapter->getResultRowObject(null,'password');
       
$auth->getStorage()->write($data); 
in another page, I read the values stored in the session as following code:
PHP Code:
$auth Zend_Auth::getInstance();
$role $this->_auth->getStorage()->read(); 
It works fine.
But when I call Zend_Session::setOptions to set options for Session, the value readed from Session is null. following is the code of setOptions :
PHP Code:
    private function _buildSession()
    {
        
$sessionConfig $this->_config->system->session->toArray();
        
        if (isset(
$sessionConfig ['save_path']))
        {
            
$sessionConfig ['save_path'] = ROOT_DIR $sessionConfig ['save_path'];
        }
        if (isset(
$sessionConfig ['cookie_path']))
        {
            
$sessionConfig ['cookie_path'] = ROOT_DIR $sessionConfig ['cookie_path'];
        }
        
        
Zend_Session::setOptions($sessionConfig);
    } 
Could you please tell me what the problem is ?

thank you in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:46 PM.