当前位置:网站首页>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边栏推荐
- Single box check box
- 【LeetCode】501. Mode in binary search tree (2 wrong questions)
- 问下,这个ADB mysql支持sqlserver吗?
- Pat class a 1162 postfix expression
- Moco V2 literature research [self supervised learning]
- Sqoop安装
- 单项框 复选框
- Daily question 2 12
- 看 TDengine 社区英雄线上发布会,听 TD Hero 聊开发者传奇故事
- The database and recharge are gone
猜你喜欢
openresty ngx_ Lua execution phase
Zabbix
Azkaban actual combat
Utilisation simple de devtools
Linux安装Redis
Avoid material "minefields"! Play with super high conversion rate
Machine learning experiment report 1 - linear model, decision tree, neural network part
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Openresty ngx Lua Execution stage
端口,域名,协议。
随机推荐
[Yu Yue education] National Open University autumn 2018 8109-22t (1) monetary and banking reference questions
openresty ngx_ Lua execution phase
Avoid material "minefields"! Play with super high conversion rate
Openresty ngx Lua Execution stage
[micro service SCG] 33 usages of filters
平台入驻与独立部署优缺点对比
Design and implementation of high availability website architecture
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Spoon inserts and updates the Oracle database, and some prompts are inserted with errors. Assertion botch: negative time
openresty ngx_ Lua variable operation
【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
1. Five layer network model
Last words record
Character painting, I use characters to draw a Bing Dwen Dwen
[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)
Sqoop安装
Sqoop command
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Machine learning experiment report 1 - linear model, decision tree, neural network part