当前位置:网站首页>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边栏推荐
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- Usage scenarios and solutions of ledger sharing
- tuple and point
- Breaking the information cocoon - my method of actively obtaining information - 3
- Why do you understand a16z? Those who prefer Web3.0 Privacy Infrastructure: nym
- Why is this an undefined behavior- Why is this an undefined behavior?
- Pytest (4) - test case execution sequence
- IPv6 experiment
- Azkaban实战
- openresty ngx_lua執行階段
猜你喜欢

openresty ngx_lua執行階段

Flume configuration 4 - customize mysqlsource

【LeetCode】501. Mode in binary search tree (2 wrong questions)

Devtools的簡單使用

【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)

【LeetCode】110. Balanced binary tree (2 brushes of wrong questions)

Asp+access campus network goods trading platform

Design and practice of kubernetes cluster and application monitoring scheme

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)

Tiny series rendering tutorial
随机推荐
2.常见的请求方法
Linux安装Redis
openresty ngx_lua执行阶段
LeetCode --- 1071. Great common divisor of strings problem solving Report
TCP security of network security foundation
Sqoop安装
Elk log analysis system
this+闭包+作用域 面试题
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Design and implementation of kindergarten management system
PHP cli getting input from user and then dumping into variable possible?
2021 Li Hongyi machine learning (2): pytorch
Idea inheritance relationship
Sqoop命令
Simple use of devtools
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Good documentation
Design and implementation of campus epidemic prevention and control system based on SSM
【微服务|SCG】Filters的33种用法
LeetCode146. LRU cache