Sessions not deleting |
My session files are not automatically being deleted. I have a client facing website that uses sessions with logins and a REST API that uses Codeigniter. The API doesn’t use any session data, but I think a session still gets started automatically.
My session files are building up in: /var/cpanel/php/sessions/ea-php55 That directory gets up to 30 gigabytes in size. Why is it growing so large and why isn’t it cleaning on its own? These are my session settings: $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = ‘mysession'; $config['sess_expiration'] = (60 * 60); $config['sess_save_path'] = FCPATH . "sessions"; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = TRUE; Any ideas?
Does your CodeIgniter installation start at /var/cpanel/php/ ? Or, stated a different way, is the main CodeIgniter file index.php found in the /var/cpane/php/ folder?
Also check your php.ini settings for sessions
Code: session.gc_probability = 1 Those are default values. if gc_probability = 0 it will never delete the session files. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(12-01-2018, 02:52 PM)InsiteFX Wrote: Also check your php.ini settings for sessions I already had those set like you posted.
What version of CI are you using? Pretty sure at some point they fixed something to do with sessions on CI3.
(12-03-2018, 06:00 PM)coolerkid9090 Wrote: It's in the public_html folder. Sorry if I was not clear, but what I'm asking for is the full path to the public_html folder. The reason I ask is that your statement: Quote:...session files are building up in: /var/cpanel/php/sessions/ea-php55begs the question of whether the path /var/cpanel/php/ leads to the public_html folder - or not. If it does not, then all those session fles belong to cpanel and not to CodeIgniter.
(12-04-2018, 09:17 AM)dave friend Wrote:(12-03-2018, 06:00 PM)coolerkid9090 Wrote: It's in the public_html folder. The full path is: /home/user/public_html Is that what you mean? If not, how do I find the info you are looking for? Thanks!!
(12-04-2018, 12:24 PM)coolerkid9090 Wrote: The full path is: /home/user/public_html If that is where the CodeIgniter "index.php" file is found then, yes that's what I was looking for. Because you use this to define where session files are saved PHP Code: $config['sess_save_path'] = FCPATH . "sessions"; So, that makes me reasonably confident that the session files building up in /var/cpanel/php/sessions/ea-php55 are related to cpanel. |
Welcome Guest, Not a member yet? Register Sign In |