当前位置:网站首页>Clean up PHP session files
Clean up PHP session files
2022-07-05 02:57:00 【Technology feast】
problem :
On my website I use PHP sessions. On my website , I use PHP conversation .Session information is stored in files in my ./session path. Session information is stored in my ./session In the file in the path .After a few months I discovered that these session files are never deleted, by now there are 145.000 of them in this directory. After a few months , I found that these session files were never deleted , up to now , There are in this directory 145.000 File .
How should these be cleaned up? How should these be cleaned up ?Do I have to do it programmatically, or is ther a setting I can use somewhere that would have this cleanup happen automatically? Do I have to do this programmatically , Or the settings I can use where this cleanup can be done automatically ?
EDIT forgot to mention: This site runs at a provider, so I don't have access to a command line. edit Forgot to mention : The site runs on the provider , So I have no access to the command line .I do have ftp-access, but the session files belong to another user (the one the webserver proces runs I guess) From the first answers I got I think it's not just a setting on the server or PHP, so I guess I'll have to implement something for it in PHP, and call that periodically from a browser (maybe from a cron job running on my own machine at home) I do ftp Access right , But the session file belongs to another user ( I guess this server is running this server ). From the first answer I got , I think it's not just servers or PHP Settings on , So I think it must be in PHP To realize some functions , And call this function regularly from the browser ( Maybe it's running on my own home computer cron Homework )
Solution :
Reference resources : https://stackoom.com/en/question/2kDO边栏推荐
- 丸子百度小程序详细配置教程,审核通过。
- Single box check box
- 1.五层网络模型
- 端口,域名,协议。
- 【LeetCode】106. Construct binary tree from middle order and post order traversal sequence (wrong question 2)
- LeetCode --- 1071. Great common divisor of strings problem solving Report
- Single line function*
- 低度酒赛道进入洗牌期,新品牌如何破局三大难题?
- Hmi-30- [motion mode] the module on the right side of the instrument starts to write
- SQL injection exercise -- sqli Labs
猜你喜欢

this+闭包+作用域 面试题
![[uc/os-iii] chapter 1.2.3.4 understanding RTOS](/img/33/1d94583a834060cc31cab36db09d6e.jpg)
[uc/os-iii] chapter 1.2.3.4 understanding RTOS

Pat class a 1160 forever (class B 1104 forever)

Sqoop command

Single line function*

Character painting, I use characters to draw a Bing Dwen Dwen

Pytest (5) - assertion

Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics

LeetCode146. LRU cache

Elfk deployment
随机推荐
Single box check box
Acwing第 58 场周赛【完结】
数据库和充值都没有了
返回二叉树中两个节点的最低公共祖先
有个疑问 flink sql cdc 的话可以设置并行度么, 并行度大于1会有顺序问题吧?
Spark SQL learning bullet 2
Yuan universe also "real estate"? Multiple second-hand trading websites block metauniverse keywords
[micro service SCG] 33 usages of filters
2022/02/13
100 basic multiple choice questions of C language (with answers) 04
Usage scenarios and solutions of ledger sharing
ELFK部署
SQL performance optimization skills
Sqoop安装
[Yu Yue education] National Open University autumn 2018 8109-22t (1) monetary and banking reference questions
[Yu Yue education] National Open University spring 2019 0505-22t basic nursing reference questions
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
LeetCode146. LRU cache
Asp+access campus network goods trading platform
GFS distributed file system