Middle-end/CodeIgniter

session unlink error on windows 윈도우에서 unlink 에러날때

hi guys.


These days I'm working with codeigniter on windows.

First of all, I recommend you if develop a web site then USE codeigniter.


the fastest and lightest framework for php. I've heard that it's the only one php.net recommend.


So now. if you're getting a error message as below one:

Message: unlink(nananana): Permission denied

Filename: drivers/Session_files_driver.php


I dunno why this error still be occurred. Maybe it's just because of running on windows. right? 

For additional information about this error All I know is session file driver's gc function is trying to unlink(delete) the file that has been expired which doesn't exist anymore.

So we should check that file exists like this:


if( is_file($this->_config['save_path'].DIRECTORY_SEPARATOR.$file) )
{
	unlink($this->_config['save_path'].DIRECTORY_SEPARATOR.$file);
}


Okay. I dunno why the ci didn't patch this. It has already been issued on https://github.com/bcit-ci/CodeIgniter/issues/3610


good luck guys. 


p.s. 영어 공부중이라서 못해도 양해바람. 성격급한 한쿡인들은 걍 소스 복붙 ㄱ~ ^^

,

알림

이 블로그는 구글에서 제공한 크롬에 최적화 되어있고, 네이버에서 제공한 나눔글꼴이 적용되어 있습니다.

카운터

Today :
Yesterday :
Total :

태그