Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

PHP removing files sessions

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
edica
Posts: 126
Joined: Tue May 26, 2015 7:31 pm

PHP removing files sessions
  • Quote

Post by edica » Mon Jan 11, 2016 3:17 pm

About removing files in the folder sessions? How PHP does this automatically for each site?
I use Ubuntu but here not work.

php.ini:
session.gc_divisor 1000
session.gc_maxlifetime 1440
session.gc_probability 1
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: PHP removing files sessions
  • Quote

Post by skurudo » Tue Jan 12, 2016 8:35 am

I don't really trust php GC anymore (from php 5.4 and later) and clean this mess with my own hands, so you do too with small bash script in cron:

Code: Select all

nice find /home/*/tmp -type f -name 'sess_*' -ctime +5 -delete 
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password