CodeIgniter会话错误 - 不允许解除链接操作 [英] CodeIgniter Session Error - Unlink Operation not Permitted
问题描述
我试图调试这个CodeIgniter问题,我有我的应用程序。我不知道,所以我想知道是否有其他人遇到这个问题,可以说明一下吗?
I'm trying to debug this CodeIgniter issue I am having with my application. I cannot figure it out so I was wondering if anyone else has come across this and could shed some light on it?
这是用户登录时随机出现的。用户可能正在浏览和突然这个错误弹出。刷新浏览器并消失了。
This occurs randomly when a user is logged in. The user could be browsing and all of a sudden this error pops up. Refresh the browser and it's gone.
CodeIgniter 3
CodeIgniter 3
谢谢!
A PHP Error was encountered
Severity: Warning
Message: unlink(/tmp/ci_session0189a7f1c86eb18fb70afcfedc2d5040e9c23146): Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 346
Backtrace:
File: /home/*****/public_html/application/controllers/User.php
Line: 5
Function: __construct
File: /home/*****/public_html/index.php
Line: 292
Function: require_once
推荐答案
在做了一些更多的研究后,我发现了问题和答案。
After doing some more research I found the issue and the answer.
在config.php文件中,必须设置sess_save_path为有效路径。它最初设置为NULL。我有我的设置:
In the config.php file you MUST set sess_save_path to a valid path. It was initially set to NULL. I have mine set to:
$ config ['sess_save_path'] = BASEPATH。 'cache /';
现在会话保存在此文件夹中,需要时可以取消链接。
Now the sessions are being saved in this folder and can be unlinked when needed to.
这篇关于CodeIgniter会话错误 - 不允许解除链接操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!