yii Session object destruction failed [ 未指定版本 ]
用yii做的媒体后台,用admin登录,不成功。显示如下。求助。
PHP warningsession_regenerate_id() [<a href="function.session-regenerate-id">function.session-regenerate-id</a>]: Session object destruction failed</p><p> D:\apache\htdocs\game\yii\framework\web\CHttpSession.php(185)</p><p></p><pre> {
<span class="ln">174</span> session_id($value);
<span class="ln">175</span> }
<span class="ln">176</span>
<span class="ln">177</span> /**
<span class="ln">178</span> * Updates the current session id with a newly generated one .
<span class="ln">179</span> * Please refer to {@link http://php.net/session_regenerate_id} for more details.
<span class="ln">180</span> * @param boolean $deleteOldSession Whether to delete the old associated session file or not.
<span class="ln">181</span> * @since 1.1.8
<span class="ln">182</span> */
<span class="ln">183</span> public function regenerateID($deleteOldSession=false)
<span class="ln">184</span> {
<span class="error"><span class="ln error-ln">185</span> session_regenerate_id($deleteOldSession);
</span><span class="ln">186</span> }
<span class="ln">187</span>
<span class="ln">188</span> /**
<span class="ln">189</span> * @return string the current session name
<span class="ln">190</span> */
<span class="ln">191</span> public function getSessionName()
<span class="ln">192</span> {
<span class="ln">193</span> return session_name();
<span class="ln">194</span> }
<span class="ln">195</span>
<span class="ln">196</span> /**
<span class="ln">197</span> * @param string $value the session name for the current session, must be an alphanumeric string, defaults to PHPSESSID</pre><h2>Stack Trace</h2><table style="width:100%;"><tbody><tr class="trace core collapsed"><td class="number">#0</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CHttpSession.php(185): <strong>session_regenerate_id</strong>(true) </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#1</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\auth\CWebUser.php(708): <strong>CHttpSession</strong>-><strong>regenerateID</strong>(true) </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#2</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\auth\CWebUser.php(227): <strong>CWebUser</strong>-><strong>changeIdentity</strong>("admin", "admin", array()) </div></td></tr></tbody></table><table style="width:100%;"><tbody><tr class="trace app expanded"><td class="number"> </td><td class="content"><div class="trace-file"><div class="minus">–</div> D:\apache\htdocs\game\m2\protected\models\LoginForm.php(71): <strong>CWebUser</strong>-><strong>login</strong>(UserIdentity, 0) </div><div class="code"><pre><span class="ln">66</span> $this->_identity->authenticate();
<span class="ln">67</span> }
<span class="ln">68</span> if($this->_identity->errorCode===UserIdentity::ERROR_NONE)
<span class="ln">69</span> {
<span class="ln">70</span> $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
<span class="error"><span class="ln error-ln">71</span> Yii::app()->user->login($this->_identity,$duration);
</span><span class="ln">72</span> return true;
<span class="ln">73</span> }
<span class="ln">74</span> else
<span class="ln">75</span> return false;
<span class="ln">76</span> }
</pre></div></td></tr></tbody></table><table style="width:100%;"><tbody><tr class="trace app expanded"><td class="number">#4</td><td class="content"><div class="trace-file"><div class="minus">–</div> D:\apache\htdocs\game\m2\protected\controllers\SiteController.php(88): <strong>LoginForm</strong>-><strong>login</strong>() </div><div class="code"><pre><span class="ln">83</span> // collect user input data
<span class="ln">84</span> if(isset($_POST['LoginForm']))
<span class="ln">85</span> {
<span class="ln">86</span> $model->attributes=$_POST['LoginForm'];
<span class="ln">87</span> // validate user input and redirect to the previous page if valid
<span class="error"><span class="ln error-ln">88</span> if($model->validate() && $model->login())
</span><span class="ln">89</span> $this->redirect(Yii::app()->user->returnUrl);
<span class="ln">90</span> }
<span class="ln">91</span> // display the login form
<span class="ln">92</span> $this->render('login',array('model'=>$model));
<span class="ln">93</span> }
</pre></div></td></tr></tbody></table><table style="width:100%;"><tbody><tr class="trace core collapsed"><td class="number">#5</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\actions\CInlineAction.php(49): <strong>SiteController</strong>-><strong>actionLogin</strong>() </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#6</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CController.php(308): <strong>CInlineAction</strong>-><strong>runWithParams</strong>(array("r" => "site/login")) </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#7</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(CInlineAction) </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#8</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(CInlineAction, array()) </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#9</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CWebApplication.php(282): <strong>CController</strong>-><strong>run</strong>("login") </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#10</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\web\CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("site/login") </div><div class="code"></div></td></tr><tr class="trace core collapsed"><td class="number">#11</td><td class="content"><div class="trace-file"><div class="plus">+</div> D:\apache\htdocs\game\yii\framework\base\CApplication.php(169): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div><div class="code"></div></td></tr><tr class="trace app expanded"><td class="number">#12</td><td class="content"><div class="trace-file"><div class="minus">–</div> D:\apache\htdocs\game\m2\index.php(13): <strong>CApplication</strong>-><strong>run</strong>() </div><div class="code"><pre><span class="ln">08</span> defined('YII_DEBUG') or define('YII_DEBUG',true);
<span class="ln">09</span> // specify how many levels of call stack should be shown in each log message
<span class="ln">10</span> defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
<span class="ln">11</span>
<span class="ln">12</span> require_once($yii);
<span class="error"><span class="ln error-ln">13</span> Yii::createWebApplication($config)->run();
</span></pre></div></td></tr></tbody></table>
共 4 个回答
-
icultivator 回答于 2013-11-18 08:39 举报共 2 条回复
yii1234
注册时间:2013-11-17
最后登录:2013-12-14
在线时长:1小时50分
最后登录:2013-12-14
在线时长:1小时50分
- 粉丝0
- 金钱0
- 威望0
- 积分10