sasori Posted October 28, 2010 Share Posted October 28, 2010 Hi, can you give me a snippet how to include Zend_Session::start() in bootstrap file ? thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/217068-how-to-include-zend_sessionstart-in-bootstrap/ Share on other sites More sharing options...
gizmola Posted October 28, 2010 Share Posted October 28, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/217068-how-to-include-zend_sessionstart-in-bootstrap/#findComment-1127412 Share on other sites More sharing options...
sasori Posted October 28, 2010 Author Share Posted October 28, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/217068-how-to-include-zend_sessionstart-in-bootstrap/#findComment-1127413 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.