当前位置:网站首页>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边栏推荐
- Kotlin - 协程 Coroutine
- How to find hot projects in 2022? Dena community project progress follow-up, there is always a dish for you (1)
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Utilisation simple de devtools
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Share the newly released web application development framework based on blazor Technology
- Single box check box
- Linux Installation redis
- SFTP cannot connect to the server # yyds dry goods inventory #
猜你喜欢
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
this+闭包+作用域 面试题
Openresty ngx Lua Execution stage
Design of KTV intelligent dimming system based on MCU
【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)
Azkaban installation and deployment
Zabbix
单项框 复选框
Learn game model 3D characters, come out to find a job?
Talk about the SQL server version of DTM sub transaction barrier function
随机推荐
Pat class a 1160 forever (class B 1104 forever)
Acwing game 58 [End]
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Linux安装Redis
Design and implementation of high availability website architecture
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Flume configuration 4 - customize mysqlsource
8. Commodity management - commodity classification
为什么腾讯阿里等互联网大厂诞生的好产品越来越少?
Share the newly released web application development framework based on blazor Technology
Can you really learn 3DMAX modeling by self-study?
有个疑问 flink sql cdc 的话可以设置并行度么, 并行度大于1会有顺序问题吧?
Qrcode: generate QR code from text
Zabbix
Why do you understand a16z? Those who prefer Web3.0 Privacy Infrastructure: nym
2021 Li Hongyi machine learning (1): basic concepts
看 TDengine 社区英雄线上发布会,听 TD Hero 聊开发者传奇故事
Talk about the SQL server version of DTM sub transaction barrier function
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
Day_ 17 IO stream file class