Session Errors When Moving to ISP

Hello,

I recently uploaded a Yii app to a shared host and am receiving the error below. Up until now, I have done all development on a local server running both linux and os x. This problem does not occur on either of these environments, but does so on the hosted service.

Any ideas what could be causing this?

Thanks

R




Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/dehw3328/public_html/protected/components/UserIdentity.php on line 24

PHP Error


Description


session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/dehw3328/public_html/protected/components/UserIdentity.php:24)


Source File


/home/dehw3328/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 /home/dehw3328/yii/framework/web/CHttpSession.php(102): session_start()

#1 /home/dehw3328/yii/framework/web/CHttpSession.php(75): CHttpSession->open()

#2 /home/dehw3328/yii/framework/base/CModule.php(326): CHttpSession->init()

#3 /home/dehw3328/yii/framework/web/CWebApplication.php(199): CWebApplication->getComponent()

#4 /home/dehw3328/yii/framework/web/auth/CWebUser.php(143): CWebApplication->getSession()

#5 /home/dehw3328/yii/framework/base/CModule.php(326): CWebUser->init()

#6 /home/dehw3328/yii/framework/base/CModule.php(91): CWebApplication->getComponent()

#7 /home/dehw3328/public_html/protected/models/LoginForm.php(53): CWebApplication->__get()

#8 /home/dehw3328/yii/framework/validators/CInlineValidator.php(39): LoginForm->authenticate()

#9 /home/dehw3328/yii/framework/validators/CValidator.php(161): CInlineValidator->validateAttribute()

#10 /home/dehw3328/yii/framework/base/CModel.php(187): CInlineValidator->validate()

#11 /home/dehw3328/public_html/protected/controllers/SiteController.php(93): LoginForm->validate()

#12 /home/dehw3328/yii/framework/web/actions/CInlineAction.php(32): SiteController->actionLogin()

#13 /home/dehw3328/yii/framework/web/CController.php(279): CInlineAction->run()

#14 /home/dehw3328/yii/framework/web/CController.php(257): SiteController->runAction()

#15 /home/dehw3328/yii/framework/web/CController.php(236): SiteController->runActionWithFilters()

#16 /home/dehw3328/yii/framework/web/CWebApplication.php(332): SiteController->run()

#17 /home/dehw3328/yii/framework/web/CWebApplication.php(120): CWebApplication->runController()

#18 /home/dehw3328/yii/framework/base/CApplication.php(133): CWebApplication->processRequest()

#19 /home/dehw3328/public_html/index.php(12): CWebApplication->run()



Please make sure neither your username, nor your password contain apostrophe. (#39)

If this is not the case, then please share your protected/components/UserIdentity.php source.

Thanks, it was an aprostrophe in the code causing the problem.

Thanks for your help.

R