Hello,
I recently set up the yii environment on Os x using MAMP.
I copied my test application over from a linux box, where it worked fine. When I run it from osx, i received a session error when printing contents from an array.
session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /Users/remo/html/robohive/protected/controllers/SiteController.php:105) Source File /Users/remo/html/yii/framework/web/CHttpSession.php(102) 00090: return false; 00091: } 00092: 00093: /** 00094: * Starts the session if it has not started yet. 00095: */ 00096: public function open() 00097: { 00098: if(session_id()==='') 00099: { 00100: if($this->getUseCustomStorage()) 00101: session_set_save_handler(array($this,'openSession'),array($this,'closeSession'),array($this,'readSession'),array($this,'writeSession'),array($this,'destroySession'),array($this,'gcSession')); 00102: session_start(); 00103: } 00104: } 00105: 00106: /** 00107: * Ends the current session and store session data. 00108: */ 00109: public function close() 00110: { 00111: if(session_id()!=='') 00112: @session_write_close(); 00113: } 00114: Stack Trace #0 /Users/remo/html/yii/framework/web/CHttpSession.php(102): session_start() #1 /Users/remo/html/yii/framework/web/CHttpSession.php(75): CHttpSession->open() #2 /Users/remo/html/yii/framework/base/CApplication.php(710): CHttpSession->init() #3 /Users/remo/html/yii/framework/web/CWebApplication.php(233): CWebApplication->getComponent() #4 /Users/remo/html/yii/framework/web/auth/CWebUser.php(83): CWebApplication->getSession() #5 /Users/remo/html/yii/framework/base/CApplication.php(710): CWebUser->init() #6 /Users/remo/html/yii/framework/base/CApplication.php(132): CWebApplication->getComponent() #7 /Users/remo/html/robohive/protected/views/layouts/main.php(25): CWebApplication->__get() #8 /Users/remo/html/yii/framework/web/CBaseController.php(119): require() #9 /Users/remo/html/yii/framework/web/CBaseController.php(88): SiteController->renderInternal() #10 /Users/remo/html/yii/framework/web/CController.php(427): SiteController->renderFile() #11 /Users/remo/html/robohive/protected/controllers/SiteController.php(109): SiteController->render() #12 /Users/remo/html/yii/framework/web/actions/CInlineAction.php(32): SiteController->actionSearch() #13 /Users/remo/html/yii/framework/web/CController.php(218): CInlineAction->run() #14 /Users/remo/html/yii/framework/web/CController.php(203): SiteController->runAction() #15 /Users/remo/html/yii/framework/web/CController.php(178): SiteController->runActionWithFilters() #16 /Users/remo/html/yii/framework/web/CWebApplication.php(149): SiteController->run() #17 /Users/remo/html/yii/framework/web/CWebApplication.php(121): CWebApplication->runController() #18 /Users/remo/html/yii/framework/base/CApplication.php(146): CWebApplication->processRequest() #19 /Users/remo/html/robohive/index.php(11): CWebApplication->run()
Would this be something related to how sessions are set up in apache/php conf on osx or something different. Can anyone point me in the right direction?
Thanks,
R