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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-24-2008, 04:36 PM
Junior Member
 
Join Date: Mar 2008
Posts: 8
Default Problem Starting Session

Hello, all
I'm getting this error

C:\works\workspace\metamodeling\tests\php-world\maven2\oaw-mvn\target\classes\model>php test-auth.php


Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Session must be started before any output has been sent to the browser; output started in C:\works\model\Security.php/61' in C:\works\model\zend\Session.php:362
Stack trace:
#0 C:\works\model\zend\Session\Namespace.php(116): Zend_Session::start(true)
#1 C:\works\model\zend\Auth\Storage\Session.php(85): Zend_Session_Namespace->__construct('Zend_Auth')
#2 C:\works\model\zend\Auth.php(92): Zend_Auth_Storage_Session->__construct()
#3 C:\works\model\Security.php(27): Zend_Auth->getStorage()
#4 C:\works\workspace\metamodeling\tests\php-world\maven2\oaw in C:\works\model\zend\Session.php on line 362


when trying to save result row object after authenticate against a table, if I do not save the object everything is ok, this is my piece of code:

final public function authenticate($userName, $userPassword)
{
$this->authAdapter->setIdentity($userName)->setCredential($userPassword);

// Perform the authentication query
$result = $this->authAdapter->authenticate();

//Store the row object for later use, so not authenticate every time its needed
if($result->isValid())
{
//Comment this line and every thing goes well, I get the identity, etc... Zend_Auth::getInstance()->getStorage()->write($this->getResultRowObject());
}

return $result;
}

Any Idea on what it is going on??
Thanks in advance. David
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-24-2008, 05:07 PM
Ewok's Avatar
Junior Member
 
Join Date: Mar 2008
Location: Colorado SPrings
Posts: 16
Send a message via MSN to Ewok Send a message via Yahoo to Ewok
Default

Do you have any whitespace at the start of any of your files?
__________________
Give all victory and gain to others
Take all defeat and loss upon yourself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-24-2008, 05:40 PM
Junior Member
 
Join Date: Mar 2008
Posts: 8
Default

No I haven't. I already check that because I get some similar error in the past, I I fixed removing them, I'm using the Zend_Framework 1.5 OCR
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-24-2008, 06:04 PM
Junior Member
 
Join Date: Mar 2008
Posts: 8
Default

Sorry my mistake, you see I'm generating some code and in one of the includes a gererated file had trailing spaces, thanks very much for the answer.
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 11:48 AM.