Bootstrapping and accessing session variables in Zend Framework?

To get the session variable back in your controller you also need to do.

To get the session variable back in your controller you also need to do: $sessionUser = new Zend_Session_Namespace('sessionUser').

Damn, you type faster than me. ;-) – David Weinraub Mar 2 at 11:08 @David Weinraub. :-) – Marcin Mar 2 at 11:10 Doh!

I assumed having the variable defined in the Bootstrap would make it available to all the controllers. Thanks for your help. – kaese Mar 2 at 11:26.

Well, the error you are getting is obvious. The $sessionUser is not defined. You must initialize such variable before assinging values to it.

Put this in your controller: $sessionUser = new Zend_Session_Namespace('sessionUser').

Thanks Richard, got it sorted now by inserting the assignment into the controllers. – kaese Mar 2 at 11:26.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions