Jump to content

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


sasori

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.