当前位置:网站首页>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边栏推荐
- Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
- 8. Commodity management - commodity classification
- TCP security of network security foundation
- Hmi-32- [motion mode] add light panel and basic information column
- spoon插入更新oracle数据库,插了一部分提示报错Assertion botch: negative time
- Pytest (5) - assertion
- [200 opencv routines] 99 Modified alpha mean filter
- 【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
- d3js小记
- Character painting, I use characters to draw a Bing Dwen Dwen
猜你喜欢
Spark SQL learning bullet 2
端口,域名,协议。
Openresty ngx Lua Execution stage
Utilisation simple de devtools
College Students' innovation project management system
openresty ngx_lua执行阶段
Azkaban安装部署
Design and implementation of kindergarten management system
Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers
SQL performance optimization skills
随机推荐
2021 Li Hongyi machine learning (2): pytorch
Scientific research: are women better than men?
Returns the lowest common ancestor of two nodes in a binary tree
腾讯云,实现图片上传
【LeetCode】404. Sum of left leaves (2 brushes of wrong questions)
问题解决:AttributeError: ‘NoneType‘ object has no attribute ‘append‘
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Voice chip wt2003h4 B008 single chip to realize the quick design of intelligent doorbell scheme
qrcode:将文本生成二维码
Asp+access campus network goods trading platform
Character painting, I use characters to draw a Bing Dwen Dwen
低度酒赛道进入洗牌期,新品牌如何破局三大难题?
spoon插入更新oracle数据库,插了一部分提示报错Assertion botch: negative time
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
Can you really learn 3DMAX modeling by self-study?
Sqoop installation
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
2021 Li Hongyi machine learning (3): what if neural network training fails
Design and implementation of high availability website architecture