Php Warning Session_Regenerate_Id()

I am working on my localhost,why I am getting this Php warning session_regenerate_id()?..sometimes I can login withoug this error. How can i fix this,I am still learning of this framework.

Thank you in advance.




C:\yii_1.1.15\web\CHttpSession.php(181)







{

170         session_id($value);

171     }

172 

173     /**

174      * Updates the current session id with a newly generated one .

175      * Please refer to {@link http://php.net/session_regenerate_id} for more details.

176      * @param boolean $deleteOldSession Whether to delete the old associated session file or not.

177      * @since 1.1.8

178      */

179     public function regenerateID($deleteOldSession=false)

180     {

181         session_regenerate_id($deleteOldSession);

182     }

183 

184     /**

185      * @return string the current session name

186      */

187     public function getSessionName()

188     {

189         return session_name();

190     }

191 

192     /**

193      * @param string $value the session name for the current session, must be an alphanumeric string, defaults to PHPSESSID






This has been fixed in the latest 1.1.15 (29 July) version https://github.com/yiisoft/yii/blob/master/framework/web/CHttpSession.php#L179




public function regenerateID($deleteOldSession=false)

{

    if($this->getIsStarted())

        session_regenerate_id($deleteOldSession);

}



That version what I am using,but I am still getting this error.

Where should I locate this file so that I can change it this same in github.

Thank you in advance.

still having error I copied the script in the github that you posted and replace the CHttpSession.php still I am getting this error…

Can you give us the exact error you are having?

I think this is what you want


 {

159 session_id($value);

160 }

161 /**

162 * Updates the current session id with a newly generated one .

163 * Please refer to {@link http://php.net/session_regenerate_id} for more details.

164 * @param boolean $deleteOldSession Whether to delete the old associated session file or not.

165 * @since 1.1.8

166 */

167 public function regenerateID($deleteOldSession=false)

168 {

169 if($this->getIsStarted())

170 session_regenerate_id($deleteOldSession);

171 }

172 /**

173 * @return string the current session name

174 */

175 public function getSessionName()

176 {

177 return session_name();

178 }

179 /**

180 * @param string $value the session name for the current session, must be an alphanumeric string, defaults to PHPSESSID

181 */

182 public function setSessionName($value)

Thank you in advance.

What server and configuration are you having there?

Did anything from here http://webomania.wordpress.com/2006/11/14/fixing-session-object-destruction-failed-error/ and here http://stackoverflow.com/questions/8549757/why-session-object-destruction-failed helped?