Jump to content

how to include Zend_Session::start() in bootstrap?


Recommended Posts

Are you using a zend_application object?  If so, then you simply have a section in your application.ini file that sets any specific session configuration variables.

 

See the http://framework.zend.com/manual/en/zend.application.available-resources.html section on session resources.

 

 

someone told me, it's automatically created. so I did not put anything at the ini file, index.php and bootstrap .

then I added this in one of my controllers

			$sess = new Zend_Session_Namespace('userNamespace');

			$sess->username = $q->$loginName;
			$sess->datejoined = $q->FieldDateSetup;

 

then I called it at the view file like this

 

Hello <?php echo $sess->username; ?>

 

how come there's an error that says

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\zf\myapp\application\modules\member\views\scripts\profile\index.phtml on line 2

where line 2 is the script i posted above

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.