当前位置:网站首页>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边栏推荐
- Eight days of learning C language - while loop (embedded) (single chip microcomputer)
- Redis distributed lock, lock code logic
- el-select,el-option下拉选择框
- Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
- Azkaban overview
- openresty ngx_lua执行阶段
- Learn game model 3D characters, come out to find a job?
- Pytest (4) - test case execution sequence
- Devtools的簡單使用
- Sqoop installation
猜你喜欢

Yyds dry goods inventory intelligent fan based on CC2530 design

Acwing第 58 场周赛【完结】

Sqoop安装

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

El select, El option drop-down selection box

Elk log analysis system

问题解决:AttributeError: ‘NoneType‘ object has no attribute ‘append‘

Bumblebee: build, deliver, and run ebpf programs smoothly like silk
![Moco V2 literature research [self supervised learning]](/img/bd/79b7b203ea064c65d143116c9f4dd0.jpg)
Moco V2 literature research [self supervised learning]

Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
随机推荐
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Design and implementation of campus epidemic prevention and control system based on SSM
Problem solving: attributeerror: 'nonetype' object has no attribute 'append‘
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)
Six stone programming: advantages of automated testing
Apache Web page security optimization
Yuan universe also "real estate"? Multiple second-hand trading websites block metauniverse keywords
返回二叉树中两个节点的最低公共祖先
Kotlin - coroutine
SFTP cannot connect to the server # yyds dry goods inventory #
Cut! 39 year old Ali P9, saved 150million
Why is this an undefined behavior- Why is this an undefined behavior?
Pytest (5) - assertion
Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
Flume configuration 4 - customize mysqlsource
Design and implementation of community hospital information system
How to make OS X read bash_ Profile instead of Profile file - how to make OS X to read bash_ profile not . profile file
Qrcode: generate QR code from text