当前位置:网站首页>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边栏推荐
- TCP security of network security foundation
- Use UDP to send a JPEG image, and UPD will convert it into the mat format of OpenCV after receiving it
- 平台入驻与独立部署优缺点对比
- Acwing第 58 场周赛【完结】
- Pat class a 1162 postfix expression
- Flume configuration 4 - customize mysqlsource
- Flume配置4——自定义MYSQLSource
- Kotlin - 协程 Coroutine
- SQL injection exercise -- sqli Labs
- openresty ngx_ Lua variable operation
猜你喜欢

Anchor free series network yolox source code line by line explanation Part 2 (a total of 10, ensure to explain line by line, after reading, you can change the network at will, not just as a participan

为什么腾讯阿里等互联网大厂诞生的好产品越来越少?

Bumblebee: build, deliver, and run ebpf programs smoothly like silk

Apache build web host

Machine learning experiment report 1 - linear model, decision tree, neural network part

Pat grade a 1119 pre- and post order traversals (30 points)

this+闭包+作用域 面试题

Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers
![ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience](/img/3b/0ae9fbadec5dbdfc6981f1f55546a5.jpg)
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience

Kbp206-asemi rectifier bridge kbp206
随机推荐
Sqoop command
SQL injection exercise -- sqli Labs
Yuan universe also "real estate"? Multiple second-hand trading websites block metauniverse keywords
问下,这个ADB mysql支持sqlserver吗?
[daily problem insight] Li Kou - the 280th weekly match (I really didn't know it could be so simple to solve other people's problems)
2021 Li Hongyi machine learning (2): pytorch
Which common ports should the server open
Elfk deployment
为什么腾讯阿里等互联网大厂诞生的好产品越来越少?
Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
Single line function*
Kotlin - 协程 Coroutine
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
When the low alcohol race track enters the reshuffle period, how can the new brand break the three major problems?
[uc/os-iii] chapter 1.2.3.4 understanding RTOS
openresty ngx_ Lua execution phase
Avoid material "minefields"! Play with super high conversion rate
Cut! 39 year old Ali P9, saved 150million
TCP security of network security foundation
D3js notes