简体   繁体   English

CodeIgniter 3关闭会话链接会话警告

[英]CodeIgniter 3 closing session warning on unlink session file

I'm using CodeIgniter 3 to develop a web app and Ion Auth to manage users' login and logout, I'm using it on localhost on Windows. 我正在使用CodeIgniter 3开发Web应用程序,并使用Ion Auth来管理用户的登录和注销,并且在Windows的localhost上使用它。 On logout I got this warning: 注销时,我收到以下警告:

Severity: Warning 严重程度:警告

Message: unlink( my_path_to_sessions\\ci_session04c5acf96846fedf1fa448278e16a4006f6a10a0): Permission denied Filename: drivers/Session_files_driver.php Line Number: 303 消息:取消链接(my_path_to_sessions \\ ci_session04c5acf96846fedf1fa448278e16a4006f6a10a0):权限被拒绝文件名:drivers / Session_files_driver.php行号:303

My Session_files_driver at line numbers 302-304: 我的Session_files_driver在第302-304行:

return file_exists($this->_file_path.$session_id)
? (unlink($this->_file_path.$session_id) && $this->_cookie_destroy())
: TRUE;

In my config file I've set: 在我的配置文件中,我设置了:

$config['sess_save_path'] = APPPATH.'sessions/';

I've also changed permissions for sessions folder. 我还更改了会话文件夹的权限。

What's the problem? 有什么问题?

I have added the constructor in controller 我在控制器中添加了构造函数

public function __construct()
{
    parent::__construct();
}

which causing this issue so I have removed it and now it's working like charm. 导致此问题的原因,因此我已将其删除现在它就像魅力一样工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM